summaryrefslogtreecommitdiffstats
path: root/parameter
diff options
context:
space:
mode:
authorSebastien Gonzalve <sebastien.gonzalve@intel.com>2015-04-09 17:17:17 +0200
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:13 -0700
commit3807b5d7441ab19e5b0e1e5b5da76b1ecd21229a (patch)
tree60436ab58999c31d9f598aece78c32e3dc31e26e /parameter
parent911844b16c6b627f421bc3368de427de3ca9f60c (diff)
downloadexternal_parameter-framework-3807b5d7441ab19e5b0e1e5b5da76b1ecd21229a.zip
external_parameter-framework-3807b5d7441ab19e5b0e1e5b5da76b1ecd21229a.tar.gz
external_parameter-framework-3807b5d7441ab19e5b0e1e5b5da76b1ecd21229a.tar.bz2
Inconsistent name of variable in RuleParser
Remove misleading hungarian notation of variable name in CRuleParser::iterate() that was making the code hard to read/maintain. Change-Id: I7a034d7999f419263551c3ed9a7c26cda38e3818 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Diffstat (limited to 'parameter')
-rw-r--r--parameter/RuleParser.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/parameter/RuleParser.cpp b/parameter/RuleParser.cpp
index d4ac87d..e77b3c8 100644
--- a/parameter/RuleParser.cpp
+++ b/parameter/RuleParser.cpp
@@ -148,26 +148,26 @@ bool CRuleParser::parse(CCompoundRule* pParentRule, string& strError)
// Iterate
bool CRuleParser::iterate(string& strError)
{
- string::size_type iDelimiter;
+ string::size_type delimiter;
assert(_uiCurrentPos <= _strApplicationRule.length());
// Consume spaces
- if ((iDelimiter = _strApplicationRule.find_first_not_of(" ", _uiCurrentPos)) != string::npos) {
+ if ((delimiter = _strApplicationRule.find_first_not_of(" ", _uiCurrentPos)) != string::npos) {
// New pos
- _uiCurrentPos = iDelimiter;
+ _uiCurrentPos = delimiter;
}
// Parse
- if ((_uiCurrentPos != _strApplicationRule.length()) && ((iDelimiter = _strApplicationRule.find_first_of(_acDelimiters[_eStatus], _uiCurrentPos)) != string::npos)) {
+ if ((_uiCurrentPos != _strApplicationRule.length()) && ((delimiter = _strApplicationRule.find_first_of(_acDelimiters[_eStatus], _uiCurrentPos)) != string::npos)) {
- switch(_strApplicationRule[iDelimiter]) {
+ switch(_strApplicationRule[delimiter]) {
case '{':
_eStatus = EBeginCompoundRule;
// Extract type
- _strRuleType = _strApplicationRule.substr(_uiCurrentPos, iDelimiter - _uiCurrentPos);
+ _strRuleType = _strApplicationRule.substr(_uiCurrentPos, delimiter - _uiCurrentPos);
_uiCurrentDeepness++;
break;
case '}':
@@ -183,14 +183,14 @@ bool CRuleParser::iterate(string& strError)
case ' ':
_eStatus = ECriterionRule;
// Extract type
- _strRuleType = _strApplicationRule.substr(_uiCurrentPos, iDelimiter - _uiCurrentPos);
+ _strRuleType = _strApplicationRule.substr(_uiCurrentPos, delimiter - _uiCurrentPos);
break;
case ',':
_eStatus = EContinue;
break;
}
// New pos
- _uiCurrentPos = iDelimiter + 1;
+ _uiCurrentPos = delimiter + 1;
} else {
if (_uiCurrentDeepness) {
@@ -240,26 +240,26 @@ CCompoundRule* CRuleParser::grabRootRule()
// Next word
bool CRuleParser::next(string& strNext, string& strError)
{
- string::size_type iDelimiter;
+ string::size_type delimiter;
// Consume spaces
- if ((iDelimiter = _strApplicationRule.find_first_not_of(" ", _uiCurrentPos)) != string::npos) {
+ if ((delimiter = _strApplicationRule.find_first_not_of(" ", _uiCurrentPos)) != string::npos) {
// New pos
- _uiCurrentPos = iDelimiter;
+ _uiCurrentPos = delimiter;
}
- if ((iDelimiter = _strApplicationRule.find_first_of("{} ,", _uiCurrentPos)) == string::npos) {
+ if ((delimiter = _strApplicationRule.find_first_of("{} ,", _uiCurrentPos)) == string::npos) {
strError = "Syntax error";
return false;
}
- strNext = _strApplicationRule.substr(_uiCurrentPos, iDelimiter - _uiCurrentPos);
+ strNext = _strApplicationRule.substr(_uiCurrentPos, delimiter - _uiCurrentPos);
// New pos
- _uiCurrentPos = iDelimiter;
+ _uiCurrentPos = delimiter;
return true;
}