diff --git a/toolsrc/include/vcpkg_Enums.h b/toolsrc/include/vcpkg_Enums.h index 08fdc64bc6..c75feaa1f4 100644 --- a/toolsrc/include/vcpkg_Enums.h +++ b/toolsrc/include/vcpkg_Enums.h @@ -4,7 +4,7 @@ namespace vcpkg::Enums { - std::string nullvalue_to_string(const std::string& enum_name); + std::string nullvalue_to_string(const CStringView enum_name); - [[noreturn]] void nullvalue_used(const LineInfo& line_info, const std::string& enum_name); + [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name); } diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp index 41479d5923..51ba9d5dcd 100644 --- a/toolsrc/src/vcpkg_Enums.cpp +++ b/toolsrc/src/vcpkg_Enums.cpp @@ -5,9 +5,9 @@ namespace vcpkg::Enums { - std::string nullvalue_to_string(const std::string& enum_name) { return Strings::format("%s_NULLVALUE", enum_name); } + std::string nullvalue_to_string(const CStringView enum_name) { return Strings::format("%s_NULLVALUE", enum_name); } - [[noreturn]] void nullvalue_used(const LineInfo& line_info, const std::string& enum_name) + [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name) { Checks::exit_with_message(line_info, "NULLVALUE of enum %s was used", enum_name); }