Code cleanup

This commit is contained in:
spx
2012-03-22 14:16:41 -07:00
committed by Birunthan Mohanathas
parent 22ccf16b41
commit fa591bdf60
2 changed files with 31 additions and 38 deletions

View File

@ -749,7 +749,7 @@ double CConfigParser::ReadFormula(LPCTSTR section, LPCTSTR key, double defValue)
bool CConfigParser::ParseFormula(const std::wstring& formula, double* resultValue)
{
// Formulas must be surrounded by parenthesis
if (!formula.empty() && formula.front() == L'(' && formula.back() == L')')
if (!formula.empty() && formula[0] == L'(' && formula[formula.size() - 1] == L')')
{
const WCHAR* errMsg = MathParser::CheckedParse(formula.c_str(), resultValue);
if (errMsg != NULL)