summaryrefslogtreecommitdiffstats
path: root/parameter/IntegerParameterType.cpp
diff options
context:
space:
mode:
authorFrédéric Boisnard <fredericx.boisnard@intel.com>2012-10-10 18:38:32 +0200
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:03:29 +0100
commit0d675d10296eb54fa0508a2424d736d4e587e191 (patch)
tree8f405a3fb3fd6725ad8911cfa26e461492a3a5a1 /parameter/IntegerParameterType.cpp
parent9533156ebad9b5989703db70be3f6bd22c9811c4 (diff)
downloadexternal_parameter-framework-0d675d10296eb54fa0508a2424d736d4e587e191.zip
external_parameter-framework-0d675d10296eb54fa0508a2424d736d4e587e191.tar.gz
external_parameter-framework-0d675d10296eb54fa0508a2424d736d4e587e191.tar.bz2
PFW: Do not check data sign when access blackboard
BZ: 61532 In the toBlackboard() and fromBlackboard() methods of the class CIntegerParameterType, checks are performed to ensure that the requested kind of data is the same as the kind of data stored. A client should be allowed to retrieve a signed integer as an unsigned integer. Change-Id: Iabc018dd74dedc6e959d7e976afbea043b327ac8 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/69640 Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/IntegerParameterType.cpp')
-rw-r--r--parameter/IntegerParameterType.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/parameter/IntegerParameterType.cpp b/parameter/IntegerParameterType.cpp
index b6784d9..ea08e43 100644
--- a/parameter/IntegerParameterType.cpp
+++ b/parameter/IntegerParameterType.cpp
@@ -213,12 +213,6 @@ bool CIntegerParameterType::fromBlackboard(string& strValue, const uint32_t& uiV
// Integer
bool CIntegerParameterType::toBlackboard(uint32_t uiUserValue, uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const
{
- if (_bSigned) {
-
- parameterAccessContext.setError("Parameter is signed");
-
- return false;
- }
if (uiUserValue < _uiMin || uiUserValue > _uiMax) {
parameterAccessContext.setError("Value out of range");
@@ -233,12 +227,6 @@ bool CIntegerParameterType::toBlackboard(uint32_t uiUserValue, uint32_t& uiValue
bool CIntegerParameterType::fromBlackboard(uint32_t& uiUserValue, uint32_t uiValue, CParameterAccessContext& parameterAccessContext) const
{
- if (_bSigned) {
-
- parameterAccessContext.setError("Parameter is signed");
-
- return false;
- }
// Do assign
uiUserValue = uiValue;
@@ -248,12 +236,6 @@ bool CIntegerParameterType::fromBlackboard(uint32_t& uiUserValue, uint32_t uiVal
// Signed Integer
bool CIntegerParameterType::toBlackboard(int32_t iUserValue, uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const
{
- if (!_bSigned) {
-
- parameterAccessContext.setError("Parameter is unsigned");
-
- return false;
- }
if (iUserValue < (int32_t)_uiMin || iUserValue > (int32_t)_uiMax) {
parameterAccessContext.setError("Value out of range");
@@ -268,12 +250,6 @@ bool CIntegerParameterType::toBlackboard(int32_t iUserValue, uint32_t& uiValue,
bool CIntegerParameterType::fromBlackboard(int32_t& iUserValue, uint32_t uiValue, CParameterAccessContext& parameterAccessContext) const
{
- if (!_bSigned) {
-
- parameterAccessContext.setError("Parameter is unsigned");
-
- return false;
- }
int32_t iValue = uiValue;
// Sign extend