Remove function StringFromInt from StringUtil.cpp/.h. C++11 has std::to_string for this now.
This commit is contained in:
parent
9a24ba343b
commit
05742ffd48
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
void Set(const char* key, int newValue, int defaultValue);
|
||||
void Set(const char* key, int newValue) {
|
||||
Set(key, StringFromInt(newValue).c_str());
|
||||
Set(key, std::to_string(newValue).c_str());
|
||||
}
|
||||
|
||||
void Set(const char* key, bool newValue, bool defaultValue);
|
||||
|
|
|
@ -185,13 +185,6 @@ bool TryParse(const std::string &str, bool *const output)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::string StringFromInt(int value)
|
||||
{
|
||||
char temp[16];
|
||||
sprintf(temp, "%i", value);
|
||||
return temp;
|
||||
}
|
||||
|
||||
std::string StringFromBool(bool value)
|
||||
{
|
||||
return value ? "True" : "False";
|
||||
|
|
|
@ -48,7 +48,6 @@ std::string ThousandSeparate(I value, int spaces = 0)
|
|||
return oss.str();
|
||||
}
|
||||
|
||||
std::string StringFromInt(int value);
|
||||
std::string StringFromBool(bool value);
|
||||
|
||||
bool TryParse(const std::string &str, bool *output);
|
||||
|
|
Loading…
Reference in New Issue