summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-19 08:46:40 -0700
committerGitHub <noreply@github.com>2018-07-19 08:46:40 -0700
commitcbf43225a9f0157d6bdf1f5116dcd2e0f45ccd70 (patch)
treec3f917d0a8e3e9e6b389d7767a32880114c4f473 /src
parentf1d7486eac17cc01bcd6e355c1cae869e7e8cf84 (diff)
parent33fbcb45a7d43fc504c5382e23de12941289aee5 (diff)
Merge pull request #704 from lioncash/string
string_util: Remove AsciiToHex()
Diffstat (limited to 'src')
-rw-r--r--src/common/string_util.cpp12
-rw-r--r--src/common/string_util.h3
2 files changed, 0 insertions, 15 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index 0027888c7..f3ad3d68a 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -34,18 +34,6 @@ std::string ToUpper(std::string str) {
return str;
}
-// faster than sscanf
-bool AsciiToHex(const char* _szValue, u32& result) {
- char* endptr = nullptr;
- const u32 value = strtoul(_szValue, &endptr, 16);
-
- if (!endptr || *endptr)
- return false;
-
- result = value;
- return true;
-}
-
// For Debugging. Read out an u8 array.
std::string ArrayToString(const u8* data, size_t size, int line_len, bool spaces) {
std::ostringstream oss;
diff --git a/src/common/string_util.h b/src/common/string_util.h
index 1f5a383cb..daa071f83 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -57,9 +57,6 @@ static bool TryParse(const std::string& str, N* const output) {
return false;
}
-// TODO: kill this
-bool AsciiToHex(const char* _szValue, u32& result);
-
std::string TabsToSpaces(int tab_size, const std::string& in);
void SplitString(const std::string& str, char delim, std::vector<std::string>& output);