summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-03-12 15:33:41 -0400
committerLioncash <mathew1800@gmail.com>2014-03-14 13:51:23 -0400
commita82675b7d581421fa80d5d5c53253cf1d5c1a26d (patch)
tree8f1efce1e00c6a7d6044ca3b543d9211a65e8c11 /Source/Core/Common/StringUtil.cpp
parentdccc6d8b47b1f6fdab5374003492560c20f766b6 (diff)
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).
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
-rw-r--r--Source/Core/Common/StringUtil.cpp4
1 files changed, 2 insertions, 2 deletions
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;