From 3807b5d7441ab19e5b0e1e5b5da76b1ecd21229a Mon Sep 17 00:00:00 2001 From: Sebastien Gonzalve Date: Thu, 9 Apr 2015 17:17:17 +0200 Subject: 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 --- parameter/RuleParser.cpp | 28 ++++++++++++++-------------- 1 file 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; } -- cgit v1.1