summaryrefslogtreecommitdiffstats
path: root/parameter/include
diff options
context:
space:
mode:
authorFrédéric Boisnard <fredericx.boisnard@intel.com>2013-07-31 17:37:20 +0200
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:04:05 +0100
commitdfbd7a605fa30c03b5e4be7e64bfd2deba64e64b (patch)
tree7170481fd43afc9895b079cc2796d4641c5853e6 /parameter/include
parent11e31aedd3af9e95a860cfc1525badd4ffd7b56f (diff)
downloadexternal_parameter-framework-dfbd7a605fa30c03b5e4be7e64bfd2deba64e64b.zip
external_parameter-framework-dfbd7a605fa30c03b5e4be7e64bfd2deba64e64b.tar.gz
external_parameter-framework-dfbd7a605fa30c03b5e4be7e64bfd2deba64e64b.tar.bz2
Fix bug when retrieving a boolean through a handle
BZ: 127872 There is a bug in the CParameterHandle::getAsBoolean() method: instead of accepting a reference to a bool in argument, it takes a copy of the boolean. The fix consists in accepting a reference as parameter. Change-Id: Id1078534620b4cd37b81efa28471ecf8f7e644b5 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/122811 Reviewed-by: buildbot <buildbot@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
Diffstat (limited to 'parameter/include')
-rw-r--r--parameter/include/ParameterHandle.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/parameter/include/ParameterHandle.h b/parameter/include/ParameterHandle.h
index 0e6660f..d548b80 100644
--- a/parameter/include/ParameterHandle.h
+++ b/parameter/include/ParameterHandle.h
@@ -45,7 +45,16 @@ public:
// Boolean access
bool setAsBoolean(bool bValue, std::string& strError);
- bool getAsBoolean(bool bValue, std::string& strError) const;
+
+ /**
+ * Fetch the parameter value as a boolean.
+ *
+ * @param bValue Reference to a boolean variable where the value will be stored
+ * @param strError Error message if a problem occured
+ *
+ * @return true on success, false otherwise
+ */
+ bool getAsBoolean(bool& bValue, std::string& strError) const;
bool setAsBooleanArray(const std::vector<bool>& abValues, std::string& strError);
bool getAsBooleanArray(std::vector<bool>& abValues, std::string& strError) const;