Skip to content
Permalink
Browse files

Revert "Merge pull request #47 from lioncash/remove-stringfromint"

Breaks Android build.

This reverts commit 12d026c, reversing
changes made to 6d67849.
  • Loading branch information...
delroth committed Feb 6, 2014
1 parent 12d026c commit 70e2ed320de81a33b146469c87e9a1203c13c171
Showing with 9 additions and 1 deletion.
  1. +1 −1 Source/Core/Common/IniFile.h
  2. +7 −0 Source/Core/Common/StringUtil.cpp
  3. +1 −0 Source/Core/Common/StringUtil.h
@@ -56,7 +56,7 @@ class IniFile

void Set(const char* key, int newValue, int defaultValue);
void Set(const char* key, int newValue) {
Set(key, std::to_string(newValue).c_str());
Set(key, StringFromInt(newValue).c_str());
}

void Set(const char* key, bool newValue, bool defaultValue);
@@ -185,6 +185,13 @@ 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";
@@ -55,6 +55,7 @@ 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);

0 comments on commit 70e2ed3

Please sign in to comment.
You can’t perform that action at this time.