- Additional fix for r502. Functions/Measures/Counter in Formula are now case-insensitive in MeasureCalc.

- "[Measure]" is now case-insensitive in DynamicVariables.
This commit is contained in:
spx
2010-08-10 18:23:10 +00:00
parent 99508e090b
commit 3d33a16f9f
4 changed files with 22 additions and 13 deletions

View File

@@ -141,7 +141,6 @@ void CMeasureCalc::ReadConfig(CConfigParser& parser, const WCHAR* section)
** FormulaReplace
**
** This replaces the word Random in m_Formula with a random number
** and all cases of counter with Counter
**
*/
void CMeasureCalc::FormulaReplace()
@@ -151,7 +150,7 @@ void CMeasureCalc::FormulaReplace()
m_Formula = m_FormulaHolder;
std::wstring::size_type loc = 0;
while ((loc = m_Formula.find_first_of(L"RrCc", loc)) != std::wstring::npos)
while ((loc = m_Formula.find_first_of(L"Rr", loc)) != std::wstring::npos)
{
if (wcsnicmp(L"Random", m_Formula.c_str() + loc, 6) == 0)
{
@@ -165,11 +164,6 @@ void CMeasureCalc::FormulaReplace()
m_Formula.replace(loc, 6, buffer);
loc += wcslen(buffer);
}
else if (wcsnicmp(L"Counter", m_Formula.c_str() + loc, 7) == 0)
{
m_Formula.replace(loc, 7, L"Counter");
loc += 7;
}
else
{
++loc;