ConfigurationType to UpperCamelCase

This commit is contained in:
Alexander Karatarakis 2017-04-03 14:52:06 -07:00
parent 6ccb3b95d8
commit fdda06e83d
4 changed files with 17 additions and 17 deletions

View File

@ -18,19 +18,19 @@ 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 ConfigurationType::Type& config() 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;
ConfigurationType::Type m_config;
LinkageType::type m_linkage;
};
@ -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);
}

View File

@ -4,30 +4,30 @@
namespace vcpkg::PostBuildLint::ConfigurationType
{
enum class backing_enum_t
enum class BackingEnum
{
NULLVALUE = 0,
DEBUG = 1,
RELEASE = 2
};
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::ConfigurationType";
static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
static constexpr type DEBUG(backing_enum_t::DEBUG);
static constexpr type RELEASE(backing_enum_t::RELEASE);
static constexpr Type NULLVALUE(BackingEnum::NULLVALUE);
static constexpr Type DEBUG(BackingEnum::DEBUG);
static constexpr Type RELEASE(BackingEnum::RELEASE);
static constexpr std::array<type, 2> values = { DEBUG, RELEASE };
static constexpr std::array<Type, 2> values = { DEBUG, RELEASE };
}

View File

@ -4,7 +4,7 @@
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)
{
@ -29,7 +29,7 @@ namespace vcpkg::PostBuildLint::BuildType
Checks::unreachable(VCPKG_LINE_INFO);
}
const ConfigurationType::type& Type::config() const
const ConfigurationType::Type& Type::config() const
{
return this->m_config;
}

View File

@ -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::toString() const
{
switch (this->backing_enum)
{