From 4e5e78b2c3669d308003713e758d6b3a59d50b0c Mon Sep 17 00:00:00 2001 From: Francois Gaffie Date: Fri, 20 Feb 2015 08:33:06 +0100 Subject: Fix "|" display artifact on inclusive criterion type When translating a numerical value to literal for an inclusive criterion type, if the numerical value is not found into the map of pairs, it appends anyway the "|". This patch removes this artifacts display if the numerical value is not part of the acceptable values of this criterion type. Change-Id: I2ff4ee1ae6e6e3ac87c94c596bae3ae534f173c4 Signed-off-by: Francois Gaffie --- parameter/SelectionCriterionType.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'parameter') diff --git a/parameter/SelectionCriterionType.cpp b/parameter/SelectionCriterionType.cpp index 2f17379..bf03735 100644 --- a/parameter/SelectionCriterionType.cpp +++ b/parameter/SelectionCriterionType.cpp @@ -179,7 +179,10 @@ std::string CSelectionCriterionType::getFormattedState(int iValue) const // Simple translation std::string strSingleValue; - getLiteralValue(iSingleBitValue, strSingleValue); + if (!getLiteralValue(iSingleBitValue, strSingleValue)) { + // Numeric value not part supported values for this criterion type. + continue; + } if (bFirst) { -- cgit v1.1