Switched from _snwprintf_s to _itow_s where possible.

This commit is contained in:
Birunthan Mohanathas
2011-11-09 08:52:32 +00:00
parent a1e722181e
commit f8f31a527e
8 changed files with 70 additions and 73 deletions

View File

@ -110,7 +110,7 @@ void CMeasureCalc::UpdateVariableMap(CMeterWindow& meterWindow)
std::list<CMeasure*>::const_iterator iter = measures.begin();
for ( ; iter != measures.end(); ++iter)
{
const char* name = (*iter)->GetANSIName();
const char* name = (*iter)->GetAsciiName();
double val = (*iter)->GetValue();
StrMap_AddString(c_VarMap, name, &val);
@ -182,7 +182,7 @@ void CMeasureCalc::FormulaReplace()
int randNumber = m_LowBound + (int)(range * rand()/(RAND_MAX + 1.0));
WCHAR buffer[32];
_snwprintf_s(buffer, _TRUNCATE, L"%i", randNumber);
_itow_s(randNumber, buffer, 10);
m_Formula.replace(loc, 6, buffer);
loc += wcslen(buffer);