From 175026ba3681bc341ae7e6f322061048a6ac1c46 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 27 Jan 2026 08:33:44 +0100 Subject: A bit of util refactorings --- src/util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 337c1e4..7dbe2bb 100644 --- a/src/util.h +++ b/src/util.h @@ -13,7 +13,7 @@ std::string to_lower(std::string str); std::string readFile(const std::string& fileName); ctor::language languageFromExtension(const std::filesystem::path& file); -std::string cleanUp(const std::string& path); +std::string cleanUp(std::string_view path); template void append(T& a, const T& b) @@ -21,13 +21,13 @@ void append(T& a, const T& b) a.insert(a.end(), b.begin(), b.end()); } -std::string esc(const std::string& in); +std::string esc(std::string_view in); //! Get system paths (ie. env var PATH). //! If path_env is provided, this search string will be used, other the PATH //! env variable is used. //! \returns a vector of the individual toknized paths. -std::vector get_paths(const std::string& path_env = {}); +std::vector get_paths(std::string_view path_env = {}); std::string locate(const std::string& app, const std::vector& paths, -- cgit v1.2.3