mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 07:19:24 +08:00
Enums::f(): Accept CStringView instead of std::string&
This commit is contained in:
parent
ef8c21290e
commit
ae1e1af245
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user