Enums::f(): Accept CStringView instead of std::string&

This commit is contained in:
Alexander Karatarakis 2017-04-28 13:07:51 -07:00
parent ef8c21290e
commit ae1e1af245
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}