Skip to content

Commit 6dd00be

Browse files
committed
Refactorized multiple prototypes
1 parent d63d884 commit 6dd00be

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/utils/string.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ std::string string_to_hex(const std::string& input) {
135135
return output;
136136
}
137137

138-
std::string toHexIfNeeded(const std::string &str) {
139-
return toHexIfNeeded(str, false);
140-
}
141-
142138
std::string toHexIfNeeded(const std::string &str, bool escape_spec) {
143139
// escape_spec: escape special chars or not
144140
// spec chars: '"' (quotation mark, ascii 34), '\' (backslash, ascii 92)

src/utils/string.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ std::string dash_if_empty(const std::string *str);
6161
std::string limitTo(int amount, const std::string &str);
6262
std::string removeBracketsIfNeeded(std::string a);
6363
std::string string_to_hex(const std::string& input);
64-
std::string toHexIfNeeded(const std::string &str);
65-
std::string toHexIfNeeded(const std::string &str, bool escape_spec);
64+
std::string toHexIfNeeded(const std::string &str, bool escape_spec = false);
6665
std::string tolower(std::string str);
6766
std::string toupper(std::string str);
6867
std::vector<std::string> ssplit(std::string str, char delimiter);

0 commit comments

Comments
 (0)