ENUM_NAME should be in the enum namespace

This commit is contained in:
Alexander Karatarakis 2017-04-25 17:16:09 -07:00
parent 003693c5ac
commit 1ac0f768b7
2 changed files with 4 additions and 4 deletions

View File

@ -28,10 +28,10 @@ namespace vcpkg::PostBuildLint
BackingEnum backing_enum; BackingEnum backing_enum;
}; };
static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
namespace BuildPoliciesC namespace BuildPoliciesC
{ {
static constexpr const char* ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
static constexpr BuildPolicies NULLVALUE(BuildPolicies::BackingEnum::NULLVALUE); static constexpr BuildPolicies NULLVALUE(BuildPolicies::BackingEnum::NULLVALUE);
static constexpr BuildPolicies EMPTY_PACKAGE(BuildPolicies::BackingEnum::EMPTY_PACKAGE); static constexpr BuildPolicies EMPTY_PACKAGE(BuildPolicies::BackingEnum::EMPTY_PACKAGE);
static constexpr BuildPolicies DLLS_WITHOUT_LIBS(BuildPolicies::BackingEnum::DLLS_WITHOUT_LIBS); static constexpr BuildPolicies DLLS_WITHOUT_LIBS(BuildPolicies::BackingEnum::DLLS_WITHOUT_LIBS);

View File

@ -5,7 +5,7 @@
namespace vcpkg::PostBuildLint namespace vcpkg::PostBuildLint
{ {
static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(ENUM_NAME); static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(BuildPoliciesC::ENUM_NAME);
static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
@ -74,7 +74,7 @@ namespace vcpkg::PostBuildLint
case BuildPoliciesC::EMPTY_INCLUDE_FOLDER: case BuildPoliciesC::EMPTY_INCLUDE_FOLDER:
return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER; return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER;
case BuildPoliciesC::NULLVALUE: case BuildPoliciesC::NULLVALUE:
Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME); Enums::nullvalue_used(VCPKG_LINE_INFO, BuildPoliciesC::ENUM_NAME);
default: default:
Checks::unreachable(VCPKG_LINE_INFO); Checks::unreachable(VCPKG_LINE_INFO);
} }