From a82675b7d581421fa80d5d5c53253cf1d5c1a26d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 12 Mar 2014 15:33:41 -0400 Subject: Kill off some usages of c_str. Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc). --- Source/Core/Common/StringUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/StringUtil.cpp') diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 9a42d35fd6..16281ac91f 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -26,10 +26,10 @@ #endif // faster than sscanf -bool AsciiToHex(const char* _szValue, u32& result) +bool AsciiToHex(const std::string& _szValue, u32& result) { char *endptr = nullptr; - const u32 value = strtoul(_szValue, &endptr, 16); + const u32 value = strtoul(_szValue.c_str(), &endptr, 16); if (!endptr || *endptr) return false; -- cgit v1.2.3