chore: get rid of ToUpper/ToLower mutations on arguments (#3950)

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-10-18 23:23:59 +03:00 committed by GitHub
parent 84e22aa658
commit 14220a6a20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 48 deletions

View file

@ -109,18 +109,6 @@ std::ostream& operator<<(std::ostream& os, const GlobalState& state);
enum class TimeUnit : uint8_t { SEC, MSEC };
inline void ToUpper(const MutableSlice* val) {
for (auto& c : *val) {
c = absl::ascii_toupper(c);
}
}
inline void ToLower(const MutableSlice* val) {
for (auto& c : *val) {
c = absl::ascii_tolower(c);
}
}
bool ParseHumanReadableBytes(std::string_view str, int64_t* num_bytes);
bool ParseDouble(std::string_view src, double* value);