aboutsummaryrefslogtreecommitdiffstats
path: root/parameter/BooleanParameterType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parameter/BooleanParameterType.cpp')
-rw-r--r--parameter/BooleanParameterType.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/parameter/BooleanParameterType.cpp b/parameter/BooleanParameterType.cpp
index cbe4afd..34f148c 100644
--- a/parameter/BooleanParameterType.cpp
+++ b/parameter/BooleanParameterType.cpp
@@ -73,13 +73,13 @@ bool CBooleanParameterType::toBlackboard(const string& strValue, uint32_t& uiVal
bool CBooleanParameterType::fromBlackboard(string& strValue, const uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const
{
+ strValue = uiValue ? "1" : "0";
+
if (parameterAccessContext.valueSpaceIsRaw() && parameterAccessContext.outputRawFormatIsHex()) {
- strValue = "0x";
+ strValue = "0x" + strValue;
}
- strValue += uiValue ? "1" : "0";
-
return true;
}