Cosmetics

This commit is contained in:
Birunthan Mohanathas 2014-01-04 18:54:34 +02:00
parent 61cbb81756
commit ce847ac12e

View File

@ -295,9 +295,8 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
{ {
if (valueType == ValueType::EscapeRegExp) if (valueType == ValueType::EscapeRegExp)
{ {
std::wstring str = measure->GetStringValue(); strValue = measure->GetStringValue();
EscapeRegExp(str); EscapeRegExp(strValue);
strValue.assign(str);
return true; return true;
} }
@ -311,8 +310,9 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
if (*selectorSz == L'%') // Percentual if (*selectorSz == L'%') // Percentual
{ {
if (valueType == ValueType::Max || valueType == ValueType::Min) // '%' cannot be used with MAX/MIN value if (valueType == ValueType::Max || valueType == ValueType::Min)
{ {
// '%' cannot be used with Max/Min values.
return false; return false;
} }
@ -322,8 +322,9 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
{ {
errno = 0; errno = 0;
scale = _wtoi(selectorSz + 1); scale = _wtoi(selectorSz + 1);
if (errno == EINVAL || scale == 0) // Invalid scale value if (errno == EINVAL || scale == 0)
{ {
// Invalid scale value.
return false; return false;
} }
} }