summaryrefslogtreecommitdiffstats
path: root/parameter/FixedPointParameterType.cpp
diff options
context:
space:
mode:
authorSebastien Gonzalve <oznog@zarb.org>2014-02-20 22:28:03 +0100
committerDavid Wagner <david.wagner@intel.com>2014-09-11 14:25:02 +0200
commitd9526499d6ab53b7d13d1434f748f6f2161c2e0a (patch)
tree8d2e2db275800821d4bf8873fc16b686bca60b2d /parameter/FixedPointParameterType.cpp
parentffbf43b383bb8693741430b02c24dbc9b127f7f7 (diff)
downloadexternal_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.zip
external_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.tar.gz
external_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.tar.bz2
Remove using std::XXX from headers
This is a bad practice to have using in headers because it pollutes the namespace of any user of that header.
Diffstat (limited to 'parameter/FixedPointParameterType.cpp')
-rw-r--r--parameter/FixedPointParameterType.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/parameter/FixedPointParameterType.cpp b/parameter/FixedPointParameterType.cpp
index c9f736f..e7779a9 100644
--- a/parameter/FixedPointParameterType.cpp
+++ b/parameter/FixedPointParameterType.cpp
@@ -41,6 +41,8 @@
#define base CParameterType
+using std::string;
+
CFixedPointParameterType::CFixedPointParameterType(const string& strName) : base(strName), _uiIntegral(0), _uiFractional(0)
{
}
@@ -136,7 +138,7 @@ bool CFixedPointParameterType::toBlackboard(const string& strValue, uint32_t& ui
void CFixedPointParameterType::setOutOfRangeError(const string& strValue, CParameterAccessContext& parameterAccessContext) const
{
- ostringstream strStream;
+ std::ostringstream strStream;
strStream << "Value " << strValue << " standing out of admitted ";
@@ -147,7 +149,7 @@ void CFixedPointParameterType::setOutOfRangeError(const string& strValue, CParam
double dMax = 0;
getRange(dMin, dMax);
- strStream << fixed << setprecision(_uiFractional)
+ strStream << std::fixed << std::setprecision(_uiFractional)
<< "real range [" << dMin << ", " << dMax << "]";
} else {
@@ -160,11 +162,11 @@ void CFixedPointParameterType::setOutOfRangeError(const string& strValue, CParam
if (isHexadecimal(strValue)) {
// Format Min
- strStream << "0x" << hex << uppercase <<
- setw(getSize() * 2) << setfill('0') << makeEncodable(iMin);
+ strStream << "0x" << std::hex << std::uppercase <<
+ std::setw(getSize() * 2) << std::setfill('0') << makeEncodable(iMin);
// Format Max
- strStream << ", 0x" << hex << uppercase <<
- setw(getSize() * 2) << setfill('0') << makeEncodable(iMax);
+ strStream << ", 0x" << std::hex << std::uppercase <<
+ std::setw(getSize() * 2) << std::setfill('0') << makeEncodable(iMax);
} else {
@@ -186,7 +188,7 @@ bool CFixedPointParameterType::fromBlackboard(string& strValue, const uint32_t&
assert(isEncodable((uint32_t)iData, false));
// Format
- ostringstream strStream;
+ std::ostringstream strStream;
// Raw formatting?
if (parameterAccessContext.valueSpaceIsRaw()) {
@@ -194,7 +196,7 @@ bool CFixedPointParameterType::fromBlackboard(string& strValue, const uint32_t&
// Hexa formatting?
if (parameterAccessContext.outputRawFormatIsHex()) {
- strStream << "0x" << hex << uppercase << setw(getSize()*2) << setfill('0') << (uint32_t)iData;
+ strStream << "0x" << std::hex << std::uppercase << std::setw(getSize()*2) << std::setfill('0') << (uint32_t)iData;
} else {
// Sign extend
@@ -210,7 +212,7 @@ bool CFixedPointParameterType::fromBlackboard(string& strValue, const uint32_t&
// Conversion
double dData = binaryQnmToDouble(iData);
- strStream << fixed << setprecision(_uiFractional) << dData;
+ strStream << std::fixed << std::setprecision(_uiFractional) << dData;
}
strValue = strStream.str();