aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-28 13:07:51 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-28 13:07:51 -0700
commitae1e1af2455284999387005170bd2f1949dea7ed (patch)
treee3d6b91a5e4ccce7b1c42922c3a67c382c3c91dd
parentef8c21290e749bd33deef0fefb249a00b99e8212 (diff)
downloadvcpkg-ae1e1af2455284999387005170bd2f1949dea7ed.tar.gz
vcpkg-ae1e1af2455284999387005170bd2f1949dea7ed.zip
Enums::f(): Accept CStringView instead of std::string&
-rw-r--r--toolsrc/include/vcpkg_Enums.h4
-rw-r--r--toolsrc/src/vcpkg_Enums.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/include/vcpkg_Enums.h b/toolsrc/include/vcpkg_Enums.h
index 08fdc64bc..c75feaa1f 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 41479d592..51ba9d5dc 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);
}