summaryrefslogtreecommitdiffstats
path: root/parameter
diff options
context:
space:
mode:
authorPatrick Benavoli <patrick.benavoli@intel.com>2014-07-23 01:27:00 +0200
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:13 -0700
commit911844b16c6b627f421bc3368de427de3ca9f60c (patch)
tree223697b3ea168eca090cd06a673c7dbb7dea27de /parameter
parent9ad87f08eb4cfa8752f4b9e7b9deb3bd219ff591 (diff)
downloadexternal_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.zip
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.gz
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.bz2
Type mismatch corrections (Windows 64 bits)
This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Diffstat (limited to 'parameter')
-rw-r--r--parameter/ArrayParameter.cpp2
-rw-r--r--parameter/BinarySerializableElement.cpp12
-rw-r--r--parameter/BinarySerializableElement.h2
-rw-r--r--parameter/BinaryStream.cpp10
-rw-r--r--parameter/BinaryStream.h10
-rw-r--r--parameter/CompoundRule.cpp8
-rw-r--r--parameter/ConfigurableDomain.cpp46
-rw-r--r--parameter/ConfigurableDomains.cpp20
-rw-r--r--parameter/ConfigurableElement.cpp22
-rw-r--r--parameter/ConfigurableElement.h2
-rw-r--r--parameter/ConfigurableElementAggregator.cpp6
-rw-r--r--parameter/DomainConfiguration.cpp8
-rw-r--r--parameter/DomainConfiguration.h2
-rw-r--r--parameter/Element.cpp30
-rw-r--r--parameter/Element.h25
-rw-r--r--parameter/EnumParameterType.cpp16
-rw-r--r--parameter/FormattedSubsystemObject.cpp2
-rw-r--r--parameter/InstanceConfigurableElement.cpp4
-rw-r--r--parameter/MappingContext.cpp6
-rw-r--r--parameter/MappingContext.h4
-rw-r--r--parameter/ParameterBlockType.cpp2
-rw-r--r--parameter/ParameterBlockType.h2
-rw-r--r--parameter/ParameterHandle.cpp4
-rw-r--r--parameter/RuleParser.h4
-rw-r--r--parameter/SelectionCriteriaDefinition.cpp8
-rw-r--r--parameter/SelectionCriterionType.cpp4
-rw-r--r--parameter/Subsystem.cpp4
-rw-r--r--parameter/SystemClass.cpp8
-rw-r--r--parameter/TypeElement.cpp4
-rw-r--r--parameter/XmlFileIncluderElement.cpp6
-rw-r--r--parameter/include/ParameterHandle.h2
31 files changed, 152 insertions, 133 deletions
diff --git a/parameter/ArrayParameter.cpp b/parameter/ArrayParameter.cpp
index ec69191..8561410 100644
--- a/parameter/ArrayParameter.cpp
+++ b/parameter/ArrayParameter.cpp
@@ -260,7 +260,7 @@ bool CArrayParameter::setValues(uint32_t uiStartIndex, uint32_t uiBaseOffset, co
Tokenizer tok(strValue, Tokenizer::defaultDelimiters + ",");
std::vector<string> astrValues = tok.split();
- uint32_t uiNbValues = astrValues.size();
+ size_t uiNbValues = astrValues.size();
// Check number of provided values
if (uiNbValues + uiStartIndex > getArrayLength()) {
diff --git a/parameter/BinarySerializableElement.cpp b/parameter/BinarySerializableElement.cpp
index 5beed15..744d140 100644
--- a/parameter/BinarySerializableElement.cpp
+++ b/parameter/BinarySerializableElement.cpp
@@ -41,8 +41,8 @@ CBinarySerializableElement::CBinarySerializableElement(const string& strName) :
void CBinarySerializableElement::binarySerialize(CBinaryStream& binaryStream)
{
// Propagate
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -53,12 +53,12 @@ void CBinarySerializableElement::binarySerialize(CBinaryStream& binaryStream)
}
// Data size
-uint32_t CBinarySerializableElement::getDataSize() const
+size_t CBinarySerializableElement::getDataSize() const
{
// Propagate
- uint32_t uiDataSize = 0;
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiDataSize = 0;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/BinarySerializableElement.h b/parameter/BinarySerializableElement.h
index 58f5d1f..222b8e9 100644
--- a/parameter/BinarySerializableElement.h
+++ b/parameter/BinarySerializableElement.h
@@ -43,6 +43,6 @@ public:
virtual void binarySerialize(CBinaryStream& binaryStream);
// Data size
- virtual uint32_t getDataSize() const;
+ virtual size_t getDataSize() const;
protected:
};
diff --git a/parameter/BinaryStream.cpp b/parameter/BinaryStream.cpp
index 701e9b8..2dc3380 100644
--- a/parameter/BinaryStream.cpp
+++ b/parameter/BinaryStream.cpp
@@ -33,7 +33,7 @@
using namespace std;
-CBinaryStream::CBinaryStream(const string& strFileName, bool bOut, uint32_t uiDataSize, uint8_t uiStructureChecksum) :
+CBinaryStream::CBinaryStream(const string& strFileName, bool bOut, size_t uiDataSize, uint8_t uiStructureChecksum) :
_strFileName(strFileName),
_bOut(bOut),
_uiDataSize(uiDataSize),
@@ -69,10 +69,10 @@ bool CBinaryStream::open(string& strError)
if (!_bOut) {
// Get file size
- ifstream::pos_type uiFileSize = _fileStream.tellg();
+ size_t uiFileSize = _fileStream.tellg();
// Validate file size
- if (_uiDataSize + sizeof(_uiStructureChecksum) != (uint32_t)uiFileSize) {
+ if (_uiDataSize + sizeof(_uiStructureChecksum) != uiFileSize) {
// Size different from expected
strError = "Unexpected file size";
@@ -136,7 +136,7 @@ void CBinaryStream::reset()
_uiPos = 0;
}
-void CBinaryStream::write(const uint8_t* puiData, uint32_t uiSize)
+void CBinaryStream::write(const uint8_t* puiData, size_t uiSize)
{
assert(_uiPos + uiSize <= _uiDataSize);
@@ -145,7 +145,7 @@ void CBinaryStream::write(const uint8_t* puiData, uint32_t uiSize)
_uiPos += uiSize;
}
-void CBinaryStream::read(uint8_t* puiData, uint32_t uiSize)
+void CBinaryStream::read(uint8_t* puiData, size_t uiSize)
{
assert(_uiPos + uiSize <= _uiDataSize);
diff --git a/parameter/BinaryStream.h b/parameter/BinaryStream.h
index a9a0447..6df777c 100644
--- a/parameter/BinaryStream.h
+++ b/parameter/BinaryStream.h
@@ -36,7 +36,7 @@
class CBinaryStream
{
public:
- CBinaryStream(const std::string& strFileName, bool bOut, uint32_t uiDataSize, uint8_t uiStructureChecksum);
+ CBinaryStream(const std::string& strFileName, bool bOut, size_t uiDataSize, uint8_t uiStructureChecksum);
~CBinaryStream();
// Open close
@@ -47,8 +47,8 @@ public:
void reset();
// Read/Write
- void write(const uint8_t* puiData, uint32_t uiSize);
- void read(uint8_t* puiData, uint32_t uiSize);
+ void write(const uint8_t* puiData, size_t uiSize);
+ void read(uint8_t* puiData, size_t uiSize);
// Direction
bool isOut() const;
@@ -63,7 +63,7 @@ private:
// Serialization direction
bool _bOut;
// Data size
- uint32_t _uiDataSize;
+ size_t _uiDataSize;
// System structure checksum
uint8_t _uiStructureChecksum;
// Read/Write data
@@ -71,7 +71,7 @@ private:
// File
std::fstream _fileStream;
// Ops in faile
- uint32_t _uiPos;
+ size_t _uiPos;
// File state
bool _bOpen;
};
diff --git a/parameter/CompoundRule.cpp b/parameter/CompoundRule.cpp
index 9fc2674..addb31c 100644
--- a/parameter/CompoundRule.cpp
+++ b/parameter/CompoundRule.cpp
@@ -96,8 +96,8 @@ void CCompoundRule::dump(string& strResult) const
strResult += "{";
// Children
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
bool bFirst = true;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -121,8 +121,8 @@ void CCompoundRule::dump(string& strResult) const
// Rule check
bool CCompoundRule::matches() const
{
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/ConfigurableDomain.cpp b/parameter/ConfigurableDomain.cpp
index 35acb9c..aa9da51 100644
--- a/parameter/ConfigurableDomain.cpp
+++ b/parameter/ConfigurableDomain.cpp
@@ -190,8 +190,8 @@ void CConfigurableDomain::composeSettings(CXmlElement& xmlElement, CXmlSerializi
xmlElement.createChild(xmlSettingsElement, "Settings");
// Serialize out all configurations settings
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChildConfiguration;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChildConfiguration;
for (uiChildConfiguration = 0; uiChildConfiguration < uiNbConfigurations; uiChildConfiguration++) {
@@ -466,7 +466,7 @@ bool CConfigurableDomain::split(CConfigurableElement* pConfigurableElement, stri
log_info("Splitting configurable element \"%s\" domain \"%s\"", pConfigurableElement->getPath().c_str(), getName().c_str());
// Create sub domain areas for all configurable element's children
- uint32_t uiNbConfigurableElementChildren = pConfigurableElement->getNbChildren();
+ size_t uiNbConfigurableElementChildren = pConfigurableElement->getNbChildren();
if (!uiNbConfigurableElementChildren) {
@@ -475,7 +475,7 @@ bool CConfigurableDomain::split(CConfigurableElement* pConfigurableElement, stri
return false;
}
- uint32_t uiChild;
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurableElementChildren; uiChild++) {
@@ -485,7 +485,7 @@ bool CConfigurableDomain::split(CConfigurableElement* pConfigurableElement, stri
}
// Delegate to configurations
- uint32_t uiNbConfigurations = getNbChildren();
+ size_t uiNbConfigurations = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -833,8 +833,8 @@ void CConfigurableDomain::validate(const CParameterBlackboard* pMainBlackboard)
{
// Propagate
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -850,8 +850,8 @@ void CConfigurableDomain::validateAreas(const CConfigurableElement* pConfigurabl
log_info("Validating domain \"" + getName() + "\" against main blackboard for configurable element \"" + pConfigurableElement->getPath() + "\"");
// Propagate
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -890,8 +890,8 @@ void CConfigurableDomain::autoValidateAreas(const CConfigurableElement* pConfigu
}
// Validate all other configurations against found one, if any
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -908,8 +908,8 @@ void CConfigurableDomain::autoValidateAreas(const CConfigurableElement* pConfigu
bool CConfigurableDomain::autoValidateConfiguration(CDomainConfiguration* pDomainConfiguration)
{
// Find another configuration than this one, that ought to be valid!
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -929,8 +929,8 @@ bool CConfigurableDomain::autoValidateConfiguration(CDomainConfiguration* pDomai
// Search for a valid configuration for given configurable element
const CDomainConfiguration* CConfigurableDomain::findValidDomainConfiguration(const CConfigurableElement* pConfigurableElement) const
{
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -947,8 +947,8 @@ const CDomainConfiguration* CConfigurableDomain::findValidDomainConfiguration(co
// Search for an applicable configuration
const CDomainConfiguration* CConfigurableDomain::findApplicableDomainConfiguration() const
{
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -1023,8 +1023,8 @@ void CConfigurableDomain::mergeAlreadyAssociatedDescendantConfigurableElements(C
void CConfigurableDomain::mergeConfigurations(CConfigurableElement* pToConfigurableElement, CConfigurableElement* pFromConfigurableElement)
{
// Propagate to domain configurations
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -1054,8 +1054,8 @@ void CConfigurableDomain::doAddConfigurableElement(CConfigurableElement* pConfig
_syncerSet += *pSyncerSet;
// Inform configurations
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
@@ -1094,8 +1094,8 @@ void CConfigurableDomain::doRemoveConfigurableElement(CConfigurableElement* pCon
pConfigurableElement->removeAttachedConfigurableDomain(this);
// Inform configurations
- uint32_t uiNbConfigurations = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurations = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurations; uiChild++) {
diff --git a/parameter/ConfigurableDomains.cpp b/parameter/ConfigurableDomains.cpp
index b77e2aa..844ade7 100644
--- a/parameter/ConfigurableDomains.cpp
+++ b/parameter/ConfigurableDomains.cpp
@@ -56,8 +56,8 @@ bool CConfigurableDomains::childrenAreDynamic() const
void CConfigurableDomains::validate(const CParameterBlackboard* pMainBlackboard)
{
// Delegate to domains
- uint32_t uiChild;
- uint32_t uiNbConfigurableDomains = getNbChildren();
+ size_t uiChild;
+ size_t uiNbConfigurableDomains = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) {
@@ -75,8 +75,8 @@ void CConfigurableDomains::apply(CParameterBlackboard* pParameterBlackboard, CSy
/// Delegate to domains
// Start with domains that can be synchronized all at once (with passed syncer set)
- uint32_t uiChild;
- uint32_t uiNbConfigurableDomains = getNbChildren();
+ size_t uiChild;
+ size_t uiNbConfigurableDomains = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) {
@@ -364,8 +364,8 @@ void CConfigurableDomains::listDomains(string& strResult) const
strResult = "\n";
// List domains
- uint32_t uiChild;
- uint32_t uiNbConfigurableDomains = getNbChildren();
+ size_t uiChild;
+ size_t uiNbConfigurableDomains = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) {
@@ -387,8 +387,8 @@ void CConfigurableDomains::listDomains(string& strResult) const
void CConfigurableDomains::gatherAllOwnedConfigurableElements(std::set<const CConfigurableElement*>& configurableElementSet) const
{
// Delegate to domains
- uint32_t uiChild;
- uint32_t uiNbConfigurableDomains = getNbChildren();
+ size_t uiChild;
+ size_t uiNbConfigurableDomains = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) {
@@ -498,8 +498,8 @@ bool CConfigurableDomains::getApplicationRule(const string& strDomain, const str
void CConfigurableDomains::listLastAppliedConfigurations(string& strResult) const
{
// Browse domains
- uint32_t uiChild;
- uint32_t uiNbConfigurableDomains = getNbChildren();
+ size_t uiChild;
+ size_t uiNbConfigurableDomains = getNbChildren();
for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) {
diff --git a/parameter/ConfigurableElement.cpp b/parameter/ConfigurableElement.cpp
index eb66dd8..754f207 100644
--- a/parameter/ConfigurableElement.cpp
+++ b/parameter/ConfigurableElement.cpp
@@ -49,8 +49,8 @@ CConfigurableElement::~CConfigurableElement()
// XML configuration settings parsing
bool CConfigurableElement::serializeXmlSettings(CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) const
{
- uint32_t uiIndex;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiIndex;
+ size_t uiNbChildren = getNbChildren();
if (!configurationAccessContext.serializeOut()) {
// Just do basic checks and propagate to children
@@ -174,8 +174,8 @@ void CConfigurableElement::getListOfElementsWithMapping(
void CConfigurableElement::setDefaultValues(CParameterAccessContext& parameterAccessContext) const
{
// Propagate to children
- uint32_t uiIndex;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiIndex;
+ size_t uiNbChildren = getNbChildren();
for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
@@ -200,8 +200,8 @@ void CConfigurableElement::setOffset(uint32_t uiOffset)
_uiOffset = uiOffset;
// Propagate to children
- uint32_t uiIndex;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiIndex;
+ size_t uiNbChildren = getNbChildren();
for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
@@ -222,8 +222,8 @@ uint32_t CConfigurableElement::getOffset() const
uint32_t CConfigurableElement::getFootPrint() const
{
uint32_t uiSize = 0;
- uint32_t uiIndex;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiIndex;
+ size_t uiNbChildren = getNbChildren();
for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
@@ -270,8 +270,8 @@ void CConfigurableElement::fillSyncerSet(CSyncerSet& syncerSet) const
void CConfigurableElement::fillSyncerSetFromDescendant(CSyncerSet& syncerSet) const
{
// Dig
- uint32_t uiIndex;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiIndex;
+ size_t uiNbChildren = getNbChildren();
for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
@@ -401,7 +401,7 @@ void CConfigurableElement::listAssociatedDomains(std::string& strResult, bool bV
listDomains(_configurableDomainList, strResult, bVertical);
}
-uint32_t CConfigurableElement::getBelongingDomainCount() const
+size_t CConfigurableElement::getBelongingDomainCount() const
{
// Get belonging domain list
std::list<const CConfigurableDomain*> configurableDomainList;
diff --git a/parameter/ConfigurableElement.h b/parameter/ConfigurableElement.h
index cce2227..18256cf 100644
--- a/parameter/ConfigurableElement.h
+++ b/parameter/ConfigurableElement.h
@@ -74,7 +74,7 @@ public:
// Owning domains
void listAssociatedDomains(std::string& strResult, bool bVertical = true) const;
- uint32_t getBelongingDomainCount() const;
+ size_t getBelongingDomainCount() const;
// Elements with no domains
void listRogueElements(std::string& strResult) const;
diff --git a/parameter/ConfigurableElementAggregator.cpp b/parameter/ConfigurableElementAggregator.cpp
index 228db26..75bce4b 100644
--- a/parameter/ConfigurableElementAggregator.cpp
+++ b/parameter/ConfigurableElementAggregator.cpp
@@ -52,9 +52,9 @@ bool CConfigurableElementAggregator::doAggregate(const CConfigurableElement* pCo
// Check children
std::list<const CConfigurableElement*> childAggregateElementList;
- uint32_t uiIndex;
- uint32_t uiNbChildren = pConfigurableElement->getNbChildren();
- uint32_t uiNbMatchingChildren = 0;
+ size_t uiIndex;
+ size_t uiNbChildren = pConfigurableElement->getNbChildren();
+ size_t uiNbMatchingChildren = 0;
for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
diff --git a/parameter/DomainConfiguration.cpp b/parameter/DomainConfiguration.cpp
index 9c353ee..ebf3056 100644
--- a/parameter/DomainConfiguration.cpp
+++ b/parameter/DomainConfiguration.cpp
@@ -477,8 +477,8 @@ void CDomainConfiguration::split(CConfigurableElement* pFromConfigurableElement)
const CAreaConfiguration* pAreaConfigurationToSplitFrom = getAreaConfiguration(pFromConfigurableElement);
// Go through children areas to copy configuration data to them
- uint32_t uiNbConfigurableElementChildren = pFromConfigurableElement->getNbChildren();
- uint32_t uiChild;
+ size_t uiNbConfigurableElementChildren = pFromConfigurableElement->getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbConfigurableElementChildren; uiChild++) {
@@ -675,9 +675,9 @@ void CDomainConfiguration::binarySerialize(CBinaryStream& binaryStream)
}
// Data size
-uint32_t CDomainConfiguration::getDataSize() const
+size_t CDomainConfiguration::getDataSize() const
{
- uint32_t uiDataSize;
+ size_t uiDataSize;
// Add necessary size to store area configurations order
uiDataSize = _areaConfigurationList.size() * sizeof(uint32_t);
diff --git a/parameter/DomainConfiguration.h b/parameter/DomainConfiguration.h
index bea8bb6..e8b41ef 100644
--- a/parameter/DomainConfiguration.h
+++ b/parameter/DomainConfiguration.h
@@ -96,7 +96,7 @@ public:
virtual void binarySerialize(CBinaryStream& binaryStream);
// Data size
- virtual uint32_t getDataSize() const;
+ virtual size_t getDataSize() const;
// Class kind
virtual std::string getKind() const;
diff --git a/parameter/Element.cpp b/parameter/Element.cpp
index 0175084..f01217f 100644
--- a/parameter/Element.cpp
+++ b/parameter/Element.cpp
@@ -296,8 +296,8 @@ void CElement::childrenToXml(CXmlElement& xmlElement,
CXmlSerializingContext& serializingContext) const
{
// Browse children and propagate
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -346,8 +346,8 @@ bool CElement::rename(const string& strName, string& strError)
// Check for conflict with brotherhood if relevant
if (_pParent && _pParent->childrenAreDynamic()) {
- uint32_t uiParentChild;
- uint32_t uiParentNbChildren = _pParent->getNbChildren();
+ size_t uiParentChild;
+ size_t uiParentNbChildren = _pParent->getNbChildren();
for (uiParentChild = 0; uiParentChild < uiParentNbChildren; uiParentChild++) {
@@ -387,14 +387,14 @@ void CElement::addChild(CElement* pChild)
pChild->_pParent = this;
}
-CElement* CElement::getChild(uint32_t uiIndex)
+CElement* CElement::getChild(size_t uiIndex)
{
assert(uiIndex <= _childArray.size());
return _childArray[uiIndex];
}
-const CElement* CElement::getChild(uint32_t uiIndex) const
+const CElement* CElement::getChild(size_t uiIndex) const
{
assert(uiIndex <= _childArray.size());
@@ -403,7 +403,7 @@ const CElement* CElement::getChild(uint32_t uiIndex) const
CElement* CElement::getLastChild()
{
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiNbChildren = getNbChildren();
assert(uiNbChildren);
@@ -456,8 +456,8 @@ void CElement::listChildren(string& strChildList) const
strChildList = "\n";
// Get list of children names
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -469,7 +469,7 @@ void CElement::listChildren(string& strChildList) const
string CElement::listQualifiedPaths(bool bDive, uint32_t uiLevel) const
{
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiNbChildren = getNbChildren();
string strResult;
// Dive Will cause only leaf nodes to be printed
@@ -480,7 +480,7 @@ string CElement::listQualifiedPaths(bool bDive, uint32_t uiLevel) const
if (bDive || !uiLevel) {
// Get list of children paths
- uint32_t uiChild;
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -495,8 +495,8 @@ string CElement::listQualifiedPaths(bool bDive, uint32_t uiLevel) const
void CElement::listChildrenPaths(string& strChildList) const
{
// Get list of children paths
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -506,7 +506,7 @@ void CElement::listChildrenPaths(string& strChildList) const
}
}
-uint32_t CElement::getNbChildren() const
+size_t CElement::getNbChildren() const
{
return _childArray.size();
}
@@ -741,7 +741,7 @@ void CElement::appendTitle(string& strTo, const string& strTitle)
{
strTo += "\n" + strTitle + "\n";
- uint32_t uiLength = strTitle.size();
+ string::size_type uiLength = strTitle.size();
while (uiLength--) {
diff --git a/parameter/Element.h b/parameter/Element.h
index fb5faee..c93e2c4 100644
--- a/parameter/Element.h
+++ b/parameter/Element.h
@@ -76,12 +76,31 @@ public:
void listChildrenPaths(std::string& strChildPathList) const;
// Hierarchy query
- uint32_t getNbChildren() const;
+ size_t getNbChildren() const;
CElement* findChildOfKind(const std::string& strKind);
const CElement* findChildOfKind(const std::string& strKind) const;
const CElement* getParent() const;
- const CElement* getChild(uint32_t uiIndex) const;
- CElement* getChild(uint32_t uiIndex);
+
+ /**
+ * Get a child element (const)
+ *
+ * Note: this method will assert if given a wrong child index (>= number of children)
+ *
+ * @param[in] uiIndex the index of the child element from 0 to number of children - 1
+ * @return the child element
+ */
+ const CElement* getChild(size_t uiIndex) const;
+
+ /**
+ * Get a child element
+ *
+ * Note: this method will assert if given a wrong child index (>= number of children)
+ *
+ * @param[in] uiIndex the index of the child element from 0 to number of children - 1
+ * @return the child element
+ */
+ CElement* getChild(size_t uiIndex);
+
const CElement* findChild(const std::string& strName) const;
CElement* findChild(const std::string& strName);
const CElement* findDescendant(CPathNavigator& pathNavigator) const;
diff --git a/parameter/EnumParameterType.cpp b/parameter/EnumParameterType.cpp
index 126a2a5..8cca7d7 100644
--- a/parameter/EnumParameterType.cpp
+++ b/parameter/EnumParameterType.cpp
@@ -63,8 +63,8 @@ void CEnumParameterType::showProperties(string& strResult) const
strResult += "Value Pairs:\n";
// Show all value pairs
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -281,8 +281,8 @@ bool CEnumParameterType::isNumber(const string& strValue)
// Literal - numerical conversions
bool CEnumParameterType::getLiteral(int32_t iNumerical, string& strLiteral) const
{
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -301,8 +301,8 @@ bool CEnumParameterType::getLiteral(int32_t iNumerical, string& strLiteral) cons
bool CEnumParameterType::getNumerical(const string& strLiteral, int& iNumerical) const
{
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -323,8 +323,8 @@ bool CEnumParameterType::getNumerical(const string& strLiteral, int& iNumerical)
bool CEnumParameterType::isValid(int iNumerical, CParameterAccessContext& parameterAccessContext) const
{
// Check that the value is part of the allowed values for this kind of enum
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/FormattedSubsystemObject.cpp b/parameter/FormattedSubsystemObject.cpp
index 2da7deb..591ef90 100644
--- a/parameter/FormattedSubsystemObject.cpp
+++ b/parameter/FormattedSubsystemObject.cpp
@@ -92,7 +92,7 @@ string CFormattedSubsystemObject::formatMappingValue(const string& strMappingVal
string strFormattedValue = strMappingValue;
// Search for amendment (only one supported for now)
- size_t uiPercentPos = strFormattedValue.find('%', 0);
+ string::size_type uiPercentPos = strFormattedValue.find('%', 0);
// Amendment limited to one digit (values from 1 to 9)
assert(isAmendKeyValid(uiNbAmendKeys));
diff --git a/parameter/InstanceConfigurableElement.cpp b/parameter/InstanceConfigurableElement.cpp
index bfa011c..89e9266 100644
--- a/parameter/InstanceConfigurableElement.cpp
+++ b/parameter/InstanceConfigurableElement.cpp
@@ -82,8 +82,8 @@ bool CInstanceConfigurableElement::map(IMapper& mapper, std::string& strError)
if (bKeepDiving) {
// Map children
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/MappingContext.cpp b/parameter/MappingContext.cpp
index b627051..045fbd7 100644
--- a/parameter/MappingContext.cpp
+++ b/parameter/MappingContext.cpp
@@ -34,7 +34,7 @@
using std::string;
-CMappingContext::CMappingContext(uint32_t uiNbItemTypes) : _pstItemArray(new CMappingContext::SItem[uiNbItemTypes]), _uiNbItemTypes(uiNbItemTypes)
+CMappingContext::CMappingContext(size_t uiNbItemTypes) : _pstItemArray(new CMappingContext::SItem[uiNbItemTypes]), _uiNbItemTypes(uiNbItemTypes)
{
// Clear items
memset(_pstItemArray, 0, sizeof(*_pstItemArray) * uiNbItemTypes);
@@ -76,7 +76,7 @@ CMappingContext& CMappingContext::operator=(const CMappingContext& right)
// Item access
bool CMappingContext::setItem(uint32_t uiItemType, const string* pStrKey, const string* pStrItem)
{
- uint32_t uiIndex;
+ size_t uiIndex;
// Do some checks
for (uiIndex = 0; uiIndex < _uiNbItemTypes; uiIndex++) {
@@ -120,7 +120,7 @@ uint32_t CMappingContext::getItemAsInteger(uint32_t uiItemType) const
const string* CMappingContext::getItem(const string& strKey) const
{
- uint32_t uiItemType;
+ size_t uiItemType;
for (uiItemType = 0; uiItemType < _uiNbItemTypes; uiItemType++) {
diff --git a/parameter/MappingContext.h b/parameter/MappingContext.h
index 2ba8547..91fd1f4 100644
--- a/parameter/MappingContext.h
+++ b/parameter/MappingContext.h
@@ -43,7 +43,7 @@ class CMappingContext
public:
// Regular Constructor
- CMappingContext(uint32_t uiNbItemTypes);
+ CMappingContext(size_t uiNbItemTypes);
~CMappingContext();
// Copy constructor
@@ -79,6 +79,6 @@ private:
// Item array
SItem* _pstItemArray;
// Items array size
- uint32_t _uiNbItemTypes;
+ size_t _uiNbItemTypes;
};
diff --git a/parameter/ParameterBlockType.cpp b/parameter/ParameterBlockType.cpp
index 7c6bfd4..aafa7ca 100644
--- a/parameter/ParameterBlockType.cpp
+++ b/parameter/ParameterBlockType.cpp
@@ -58,7 +58,7 @@ void CParameterBlockType::populate(CElement* pElement) const
if (uiArrayLength) {
// Create child elements
- uint32_t uiChild;
+ size_t uiChild;
for (uiChild = 0; uiChild < uiArrayLength; uiChild++) {
diff --git a/parameter/ParameterBlockType.h b/parameter/ParameterBlockType.h
index 6061f78..2137a3e 100644
--- a/parameter/ParameterBlockType.h
+++ b/parameter/ParameterBlockType.h
@@ -47,6 +47,6 @@ private:
// Population
virtual void populate(CElement* pElement) const;
// Creating sub blocks with indexes
- static std::string computeChildName(uint32_t uiChild);
+ static std::string computeChildName(size_t uiChild);
};
diff --git a/parameter/ParameterHandle.cpp b/parameter/ParameterHandle.cpp
index b513972..3bb6120 100644
--- a/parameter/ParameterHandle.cpp
+++ b/parameter/ParameterHandle.cpp
@@ -436,7 +436,7 @@ bool CParameterHandle::getAsString(string& strValue, string& strError) const
bool CParameterHandle::setAsStringArray(const std::vector<string>& astrValues, string& strError)
{
// Check operation validity
- if (!checkAccessValidity(true, astrValues.size(), strError)) {
+ if (!checkAccessValidity(true, (uint32_t)astrValues.size(), strError)) {
return false;
}
@@ -475,7 +475,7 @@ bool CParameterHandle::getAsStringArray(std::vector<string>& astrValues, string&
}
// Access validity
-bool CParameterHandle::checkAccessValidity(bool bSet, uint32_t uiArrayLength, string& strError) const
+bool CParameterHandle::checkAccessValidity(bool bSet, size_t uiArrayLength, string& strError) const
{
if (bSet && !isRogue()) {
diff --git a/parameter/RuleParser.h b/parameter/RuleParser.h
index f701d76..803ea3e 100644
--- a/parameter/RuleParser.h
+++ b/parameter/RuleParser.h
@@ -78,8 +78,8 @@ private:
std::string _strApplicationRule;
// Criteria defintion
const CSelectionCriteriaDefinition* _pSelectionCriteriaDefinition;
- // Iterator
- uint32_t _uiCurrentPos;
+ /** String iterator */
+ std::string::size_type _uiCurrentPos;
// Deepness
uint32_t _uiCurrentDeepness;
// Current Type
diff --git a/parameter/SelectionCriteriaDefinition.cpp b/parameter/SelectionCriteriaDefinition.cpp
index f14aad8..d7c4228 100644
--- a/parameter/SelectionCriteriaDefinition.cpp
+++ b/parameter/SelectionCriteriaDefinition.cpp
@@ -64,8 +64,8 @@ CSelectionCriterion* CSelectionCriteriaDefinition::getSelectionCriterion(const s
void CSelectionCriteriaDefinition::listSelectionCriteria(std::list<std::string>& lstrResult, bool bWithTypeInfo, bool bHumanReadable) const
{
// Propagate
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -79,8 +79,8 @@ void CSelectionCriteriaDefinition::listSelectionCriteria(std::list<std::string>&
void CSelectionCriteriaDefinition::resetModifiedStatus()
{
// Propagate
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
CSelectionCriterion* pSelectionCriterion;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/SelectionCriterionType.cpp b/parameter/SelectionCriterionType.cpp
index bf03735..ce633c6 100644
--- a/parameter/SelectionCriterionType.cpp
+++ b/parameter/SelectionCriterionType.cpp
@@ -77,9 +77,9 @@ bool CSelectionCriterionType::getNumericalValue(const std::string& strValue, int
Tokenizer tok(strValue, _strDelimiter);
std::vector<std::string> astrValues = tok.split();
- uint32_t uiNbValues = astrValues.size();
+ size_t uiNbValues = astrValues.size();
int iResult = 0;
- uint32_t uiValueIndex;
+ size_t uiValueIndex;
iValue = 0;
// Looping on each std::string delimited by "|" token and adding the associated value
diff --git a/parameter/Subsystem.cpp b/parameter/Subsystem.cpp
index fc54695..5dbe3a0 100644
--- a/parameter/Subsystem.cpp
+++ b/parameter/Subsystem.cpp
@@ -175,8 +175,8 @@ bool CSubsystem::mapSubsystemElements(string& strError)
_contextStack.push(context);
// Map all instantiated subelements in subsystem
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp
index cc51112..ae4f747 100644
--- a/parameter/SystemClass.cpp
+++ b/parameter/SystemClass.cpp
@@ -279,8 +279,8 @@ const CSubsystemLibrary* CSystemClass::getSubsystemLibrary() const
void CSystemClass::checkForSubsystemsToResync(CSyncerSet& syncerSet)
{
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -298,8 +298,8 @@ void CSystemClass::checkForSubsystemsToResync(CSyncerSet& syncerSet)
void CSystemClass::cleanSubsystemsNeedToResync()
{
- uint32_t uiNbChildren = getNbChildren();
- uint32_t uiChild;
+ size_t uiNbChildren = getNbChildren();
+ size_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/TypeElement.cpp b/parameter/TypeElement.cpp
index 7e58c75..37228d7 100644
--- a/parameter/TypeElement.cpp
+++ b/parameter/TypeElement.cpp
@@ -83,8 +83,8 @@ void CTypeElement::showProperties(std::string& strResult) const
void CTypeElement::populate(CElement* pElement) const
{
// Populate children
- uint32_t uiChild;
- uint32_t uiNbChildren = getNbChildren();
+ size_t uiChild;
+ size_t uiNbChildren = getNbChildren();
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
diff --git a/parameter/XmlFileIncluderElement.cpp b/parameter/XmlFileIncluderElement.cpp
index 693b6fd..674a331 100644
--- a/parameter/XmlFileIncluderElement.cpp
+++ b/parameter/XmlFileIncluderElement.cpp
@@ -119,9 +119,9 @@ std::string CXmlFileIncluderElement::getIncludedElementType() const
{
std::string strKind = getKind();
- int iPosToRemoveFrom = strKind.rfind("Include", -1);
+ std::string::size_type pos = strKind.rfind("Include", std::string::npos);
- assert(iPosToRemoveFrom != -1);
+ assert(pos != std::string::npos);
- return strKind.substr(0, iPosToRemoveFrom);
+ return strKind.substr(0, pos);
}
diff --git a/parameter/include/ParameterHandle.h b/parameter/include/ParameterHandle.h
index 745c31b..7dd9fcb 100644
--- a/parameter/include/ParameterHandle.h
+++ b/parameter/include/ParameterHandle.h
@@ -92,7 +92,7 @@ public:
private:
// Access validity
- bool checkAccessValidity(bool bSet, uint32_t uiArrayLength, std::string& strError) const;
+ bool checkAccessValidity(bool bSet, size_t uiArrayLength, std::string& strError) const;
// Accessed parameter instance
const CBaseParameter* _pBaseParameter;