Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit db5bfd3

Browse files
clerodawagner
authored andcommitted
libcriterion: Update Criterion type display string for consistency
Criterion type, which can be inclusive or exclusive is displayed sometimes with a capital letter and sometimes not. This patch corrects this behaviour to always have the first letter in capital. Signed-off-by: Jules Clero <julesx.clero@intel.com>
1 parent 5056557 commit db5bfd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

parameter/criterion/src/Criterion.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ std::string Criterion::getCriterionName() const
105105
std::string Criterion::getFormattedDescription(bool bWithTypeInfo, bool bHumanReadable) const
106106
{
107107
std::string strFormattedDescription;
108+
std::string typeName = isInclusive() ? "Inclusive" : "Exclusive";
108109

109110
if (bHumanReadable) {
110111

@@ -118,7 +119,7 @@ std::string Criterion::getFormattedDescription(bool bWithTypeInfo, bool bHumanRe
118119

119120
// Type Kind
120121
strFormattedDescription += "(";
121-
strFormattedDescription += isInclusive() ? "Inclusive" : "Exclusive";
122+
strFormattedDescription += typeName;
122123
strFormattedDescription += "): ";
123124

124125
// States
@@ -140,7 +141,7 @@ std::string Criterion::getFormattedDescription(bool bWithTypeInfo, bool bHumanRe
140141
if (bWithTypeInfo) {
141142
// Type Kind
142143
strFormattedDescription += ", type kind: ";
143-
strFormattedDescription += isInclusive() ? "inclusive" : "exclusive";
144+
strFormattedDescription += typeName;
144145
}
145146

146147
// Current State

0 commit comments

Comments
 (0)