From 05742ffd488703f71462518957260f12cb657088 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Feb 2014 18:08:31 -0500 Subject: [PATCH] Remove function StringFromInt from StringUtil.cpp/.h. C++11 has std::to_string for this now. --- Source/Core/Common/IniFile.h | 2 +- Source/Core/Common/StringUtil.cpp | 7 ------- Source/Core/Common/StringUtil.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/Core/Common/IniFile.h b/Source/Core/Common/IniFile.h index abfb58b0a6..b2b3dba5f0 100644 --- a/Source/Core/Common/IniFile.h +++ b/Source/Core/Common/IniFile.h @@ -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); diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 7ad4ac6ca5..a0a8c739ca 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -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"; diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index 46ed382724..e6e2b17f82 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -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);