LinkageType to UpperCamelCase
MODIFY
include/PostBuildLint_BuildInfo.h
include/PostBuildLint_BuildInfo.h
@@ -11,8 +11,8 @@ namespace vcpkg::PostBuildLint
{
static BuildInfo create(std::unordered_map<std::string, std::string> pgh);
- LinkageType::type crt_linkage;
- LinkageType::type library_linkage;
+ LinkageType::Type crt_linkage;
+ LinkageType::Type library_linkage;
std::map<BuildPolicies::Type, OptBoolT> policies;
};

MODIFY
include/PostBuildLint_BuildType.h
include/PostBuildLint_BuildType.h
@@ -18,20 +18,20 @@ namespace vcpkg::PostBuildLint::BuildType
{
Type() = delete;
- constexpr explicit Type(const BackingEnum backing_enum, const ConfigurationType::Type config, const LinkageType::type linkage) :
+ constexpr explicit Type(const BackingEnum backing_enum, const ConfigurationType::Type config, const LinkageType::Type linkage) :
backing_enum(backing_enum), m_config(config), m_linkage(linkage) { }
constexpr operator BackingEnum() const { return backing_enum; }
const ConfigurationType::Type& config() const;
- const LinkageType::type& linkage() const;
+ const LinkageType::Type& linkage() const;
const std::regex& crt_regex() const;
const std::string& toString() const;
private:
BackingEnum backing_enum;
ConfigurationType::Type m_config;
- LinkageType::type m_linkage;
+ LinkageType::Type m_linkage;
};
static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildType";
@@ -43,5 +43,5 @@ namespace vcpkg::PostBuildLint::BuildType
static constexpr std::array<Type, 4> values = { DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC };
- Type value_of(const ConfigurationType::Type& config, const LinkageType::type& linkage);
+ Type value_of(const ConfigurationType::Type& config, const LinkageType::Type& linkage);
}

MODIFY
include/PostBuildLint_LinkageType.h
include/PostBuildLint_LinkageType.h
namespace vcpkg::PostBuildLint::LinkageType
{
- enum class backing_enum_t
+ enum class BackingEnum
{
NULLVALUE = 0,
DYNAMIC,
STATIC
};
- 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;
private:
- backing_enum_t backing_enum;
+ BackingEnum backing_enum;
};
static const std::string ENUM_NAME = "vcpkg::PostBuildLint::LinkageType";
- static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
- static constexpr type DYNAMIC(backing_enum_t::DYNAMIC);
- static constexpr type STATIC(backing_enum_t::STATIC);
+ static constexpr Type NULLVALUE(BackingEnum::NULLVALUE);
+ static constexpr Type DYNAMIC(BackingEnum::DYNAMIC);
+ static constexpr Type STATIC(BackingEnum::STATIC);
- static constexpr std::array<type, 2> values = { DYNAMIC, STATIC };
+ static constexpr std::array<Type, 2> values = { DYNAMIC, STATIC };
- type value_of(const std::string& as_string);
+ Type value_of(const std::string& as_string);
}

MODIFY
src/PostBuildLint.cpp
src/PostBuildLint.cpp
@@ -662,7 +662,7 @@ namespace vcpkg::PostBuildLint
switch (build_info.library_linkage)
{
- case LinkageType::backing_enum_t::DYNAMIC:
+ case LinkageType::BackingEnum::DYNAMIC:
{
const std::vector<fs::path> debug_dlls = Files::recursive_find_files_with_extension_in_dir(debug_bin_dir, ".dll");
const std::vector<fs::path> release_dlls = Files::recursive_find_files_with_extension_in_dir(release_bin_dir, ".dll");
@@ -683,7 +683,7 @@ namespace vcpkg::PostBuildLint
error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin);
break;
}
- case LinkageType::backing_enum_t::STATIC:
+ case LinkageType::BackingEnum::STATIC:
{
std::vector<fs::path> dlls;
Files::recursive_find_files_with_extension_in_dir(package_dir, ".dll", &dlls);
@@ -698,7 +698,7 @@ namespace vcpkg::PostBuildLint
error_count += check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage), release_libs, toolset.dumpbin);
break;
}
- case LinkageType::backing_enum_t::NULLVALUE:
+ case LinkageType::BackingEnum::NULLVALUE:
default:
Checks::unreachable(VCPKG_LINE_INFO);
}

MODIFY
src/PostBuildLint_BuildType.cpp
src/PostBuildLint_BuildType.cpp
namespace vcpkg::PostBuildLint::BuildType
{
- Type value_of(const ConfigurationType::Type& config, const LinkageType::type& linkage)
+ Type value_of(const ConfigurationType::Type& config, const LinkageType::Type& linkage)
{
if (config == ConfigurationType::DEBUG && linkage == LinkageType::STATIC)
{
@@ -34,7 +34,7 @@ namespace vcpkg::PostBuildLint::BuildType
return this->m_config;
}
- const LinkageType::type& Type::linkage() const
+ const LinkageType::Type& Type::linkage() const
{
return this->m_linkage;
}

MODIFY
src/PostBuildLint_LinkageType.cpp
src/PostBuildLint_LinkageType.cpp
@@ -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::toString() const
{
switch (this->backing_enum)
{
@@ -25,7 +25,7 @@ namespace vcpkg::PostBuildLint::LinkageType
}
}
- type value_of(const std::string& as_string)
+ Type value_of(const std::string& as_string)
{
if (as_string == NAME_DYNAMIC)
{

LinkageType to UpperCamelCase