diff options
Diffstat (limited to 'src/util.cc')
| -rw-r--r-- | src/util.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.cc b/src/util.cc index 010cde3..7ca9c11 100644 --- a/src/util.cc +++ b/src/util.cc @@ -15,7 +15,7 @@ std::string to_lower(std::string str) std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c) { - return std::tolower(c); + return static_cast<char>(std::tolower(c)); }); return str; } @@ -84,7 +84,7 @@ bool isClean(char c) } } -std::string cleanUp(const std::string& path) +std::string cleanUp(std::string_view path) { std::string cleaned; for(const auto& c : path) @@ -101,7 +101,7 @@ std::string cleanUp(const std::string& path) return cleaned; } -std::string esc(const std::string& in) +std::string esc(std::string_view in) { std::string out; for(auto c : in) @@ -118,7 +118,7 @@ std::string esc(const std::string& in) return out; } -std::vector<std::string> get_paths(const std::string& path_env_) +std::vector<std::string> get_paths(std::string_view path_env_) { std::string path_env; if(!path_env_.empty()) |
