mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
toString() -> to_string in various enums
This commit is contained in:
parent
818b8a4cfc
commit
9aab06f5af
@ -19,7 +19,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
constexpr explicit Type(BackingEnum backing_enum) : backing_enum(backing_enum) { }
|
||||
constexpr operator BackingEnum() const { return backing_enum; }
|
||||
|
||||
const std::string& toString() const;
|
||||
const std::string& to_string() const;
|
||||
const std::string& cmake_variable() const;
|
||||
|
||||
private:
|
||||
|
@ -26,7 +26,7 @@ namespace vcpkg::PostBuildLint::BuildType
|
||||
const ConfigurationType::Type& config() const;
|
||||
const LinkageType::Type& linkage() const;
|
||||
const std::regex& crt_regex() const;
|
||||
const std::string& toString() const;
|
||||
const std::string& to_string() const;
|
||||
|
||||
private:
|
||||
BackingEnum backing_enum;
|
||||
|
@ -17,7 +17,7 @@ namespace vcpkg::PostBuildLint::ConfigurationType
|
||||
constexpr explicit Type(BackingEnum backing_enum) : backing_enum(backing_enum) { }
|
||||
constexpr operator BackingEnum() const { return backing_enum; }
|
||||
|
||||
const std::string& toString() const;
|
||||
const std::string& to_string() const;
|
||||
|
||||
private:
|
||||
BackingEnum backing_enum;
|
||||
|
@ -16,7 +16,7 @@ namespace vcpkg::PostBuildLint::LinkageType
|
||||
constexpr explicit Type(BackingEnum backing_enum) : backing_enum(backing_enum) { }
|
||||
constexpr operator BackingEnum() const { return backing_enum; }
|
||||
|
||||
const std::string& toString() const;
|
||||
const std::string& to_string() const;
|
||||
|
||||
private:
|
||||
BackingEnum backing_enum;
|
||||
|
@ -528,11 +528,11 @@ namespace vcpkg::PostBuildLint
|
||||
|
||||
if (!libs_with_invalid_crt.empty())
|
||||
{
|
||||
System::println(System::Color::warning, "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.toString());
|
||||
System::println(System::Color::warning, "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.to_string());
|
||||
System::println("");
|
||||
for (const BuildType_and_file btf : libs_with_invalid_crt)
|
||||
{
|
||||
System::println(" %s: %s", btf.file.generic_string(), btf.build_type.toString());
|
||||
System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string());
|
||||
}
|
||||
System::println("");
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
|
||||
static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder";
|
||||
|
||||
const std::string& Type::toString() const
|
||||
const std::string& Type::to_string() const
|
||||
{
|
||||
switch (this->backing_enum)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ namespace vcpkg::PostBuildLint::BuildType
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& Type::toString() const
|
||||
const std::string& Type::to_string() const
|
||||
{
|
||||
static const std::string NAME_DEBUG_STATIC("Debug,Static");
|
||||
static const std::string NAME_DEBUG_DYNAMIC("Debug,Dynamic");
|
||||
|
@ -10,7 +10,7 @@ namespace vcpkg::PostBuildLint::ConfigurationType
|
||||
static const std::string NAME_DEBUG = "Debug";
|
||||
static const std::string NAME_RELEASE = "Release";
|
||||
|
||||
const std::string& Type::toString() const
|
||||
const std::string& Type::to_string() const
|
||||
{
|
||||
switch (this->backing_enum)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace vcpkg::PostBuildLint::LinkageType
|
||||
static const std::string NAME_DYNAMIC = "dynamic";
|
||||
static const std::string NAME_STATIC = "static";
|
||||
|
||||
const std::string& Type::toString() const
|
||||
const std::string& Type::to_string() const
|
||||
{
|
||||
switch (this->backing_enum)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user