BuildPolicies to UpperCamelCase
MODIFY
include/PostBuildLint_BuildInfo.h
include/PostBuildLint_BuildInfo.h
@@ -14,7 +14,7 @@ namespace vcpkg::PostBuildLint
LinkageType::type crt_linkage;
LinkageType::type library_linkage;
- std::map<BuildPolicies::type, OptBoolT> policies;
+ std::map<BuildPolicies::Type, OptBoolT> policies;
};
BuildInfo read_build_info(const fs::path& filepath);

MODIFY
include/PostBuildLint_BuildPolicies.h
include/PostBuildLint_BuildPolicies.h
namespace vcpkg::PostBuildLint::BuildPolicies
{
- enum class backing_enum_t
+ enum class BackingEnum
{
NULLVALUE = 0,
EMPTY_PACKAGE,
@@ -13,28 +13,28 @@ namespace vcpkg::PostBuildLint::BuildPolicies
EMPTY_INCLUDE_FOLDER
};
- struct type
+ struct Type
{
- constexpr type() : backing_enum(backing_enum_t::NULLVALUE) {}
- constexpr explicit type(backing_enum_t backing_enum) : backing_enum(backing_enum) { }
- constexpr operator backing_enum_t() const { return backing_enum; }
+ constexpr Type() : backing_enum(BackingEnum::NULLVALUE) {}
+ 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& cmake_variable() const;
private:
- backing_enum_t backing_enum;
+ BackingEnum backing_enum;
};
static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
- static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
- static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE);
- static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS);
- static constexpr type ONLY_RELEASE_CRT(backing_enum_t::ONLY_RELEASE_CRT);
- static constexpr type EMPTY_INCLUDE_FOLDER(backing_enum_t::EMPTY_INCLUDE_FOLDER);
+ static constexpr Type NULLVALUE(BackingEnum::NULLVALUE);
+ static constexpr Type EMPTY_PACKAGE(BackingEnum::EMPTY_PACKAGE);
+ static constexpr Type DLLS_WITHOUT_LIBS(BackingEnum::DLLS_WITHOUT_LIBS);
+ static constexpr Type ONLY_RELEASE_CRT(BackingEnum::ONLY_RELEASE_CRT);
+ static constexpr Type EMPTY_INCLUDE_FOLDER(BackingEnum::EMPTY_INCLUDE_FOLDER);
- static constexpr std::array<type, 4> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER };
+ static constexpr std::array<Type, 4> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER };
- type parse(const std::string& s);
+ Type parse(const std::string& s);
}

MODIFY
src/PostBuildLint.cpp
src/PostBuildLint.cpp
@@ -64,7 +64,7 @@ namespace vcpkg::PostBuildLint
return false;
}
- static lint_status check_for_files_in_include_directory(const std::map<BuildPolicies::type, OptBoolT>& policies, const fs::path& package_dir)
+ static lint_status check_for_files_in_include_directory(const std::map<BuildPolicies::Type, OptBoolT>& policies, const fs::path& package_dir)
{
if (contains_and_enabled(policies, BuildPolicies::EMPTY_INCLUDE_FOLDER))
{
@@ -423,7 +423,7 @@ namespace vcpkg::PostBuildLint
return lint_status::ERROR_DETECTED;
}
- static lint_status check_lib_files_are_available_if_dlls_are_available(const std::map<BuildPolicies::type, OptBoolT>& policies, const size_t lib_count, const size_t dll_count, const fs::path& lib_dir)
+ static lint_status check_lib_files_are_available_if_dlls_are_available(const std::map<BuildPolicies::Type, OptBoolT>& policies, const size_t lib_count, const size_t dll_count, const fs::path& lib_dir)
{
auto it = policies.find(BuildPolicies::DLLS_WITHOUT_LIBS);
if (it != policies.cend() && it->second == OptBoolT::ENABLED)

MODIFY
src/PostBuildLint_BuildInfo.cpp
src/PostBuildLint_BuildInfo.cpp
@@ -28,7 +28,7 @@ namespace vcpkg::PostBuildLint
// The remaining entries are policies
for (const std::unordered_map<std::string, std::string>::value_type& p : pgh)
{
- const BuildPolicies::type policy = BuildPolicies::parse(p.first);
+ const BuildPolicies::Type policy = BuildPolicies::parse(p.first);
Checks::check_exit(VCPKG_LINE_INFO, policy != BuildPolicies::NULLVALUE, "Unknown policy found: %s", p.first);
const OptBoolT status = OptBool::parse(p.second);
build_info.policies.emplace(policy, status);

MODIFY
src/PostBuildLint_BuildPolicies.cpp
src/PostBuildLint_BuildPolicies.cpp
@@ -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::toString() const
{
switch (this->backing_enum)
{
@@ -31,7 +31,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
}
}
- const std::string& type::cmake_variable() const
+ const std::string& Type::cmake_variable() const
{
static const std::string CMAKE_VARIABLE_EMPTY_PACKAGE = "VCPKG_POLICY_EMPTY_PACKAGE";
static const std::string CMAKE_VARIABLE_DLLS_WITHOUT_LIBS = "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
@@ -55,7 +55,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
}
}
- type parse(const std::string& s)
+ Type parse(const std::string& s)
{
if (s == NAME_EMPTY_PACKAGE)
{

BuildPolicies to UpperCamelCase