summaryrefslogtreecommitdiffstats
path: root/parameter/InstanceConfigurableElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parameter/InstanceConfigurableElement.cpp')
-rw-r--r--parameter/InstanceConfigurableElement.cpp33
1 files changed, 14 insertions, 19 deletions
diff --git a/parameter/InstanceConfigurableElement.cpp b/parameter/InstanceConfigurableElement.cpp
index 6795f8b..4a6cacc 100644
--- a/parameter/InstanceConfigurableElement.cpp
+++ b/parameter/InstanceConfigurableElement.cpp
@@ -58,34 +58,29 @@ bool CInstanceConfigurableElement::getMappingData(const string& strKey, const st
bool CInstanceConfigurableElement::map(IMapper& mapper, string& strError)
{
bool bHasMappingData = getTypeElement()->hasMappingData();
+ bool bKeepDiving = true;
// Begin
- if (bHasMappingData) {
-
- bool bKeepDiving;
-
- if (!mapper.mapBegin(this, bKeepDiving, strError)) {
-
- return false;
- }
- // Go on through children?
- if (!bKeepDiving) {
+ if (bHasMappingData && !mapper.mapBegin(this, bKeepDiving, strError)) {
- return true;
- }
+ return false;
}
- // Map children
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ // Go on through children?
+ if (bKeepDiving) {
+
+ // Map children
+ uint32_t uiNbChildren = getNbChildren();
+ uint32_t uiChild;
- for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
+ for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
- CInstanceConfigurableElement* pInstanceConfigurableChildElement = static_cast<CInstanceConfigurableElement*>(getChild(uiChild));
+ CInstanceConfigurableElement* pInstanceConfigurableChildElement = static_cast<CInstanceConfigurableElement*>(getChild(uiChild));
- if (!pInstanceConfigurableChildElement->map(mapper, strError)) {
+ if (!pInstanceConfigurableChildElement->map(mapper, strError)) {
- return false;
+ return false;
+ }
}
}