[vcpkg_Build.h] Naming scheme, unneeded #include, unneeded inline

This commit is contained in:
Alexander Karatarakis 2017-09-07 16:16:30 -07:00
parent 3ac99b2cee
commit d2de7d3e7d
3 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,6 @@
#include <array>
#include <map>
#include <unordered_map>
#include <vector>
namespace vcpkg::Build
@ -56,7 +55,7 @@ namespace vcpkg::Build
CASCADED_DUE_TO_MISSING_DEPENDENCIES
};
static constexpr std::array<BuildResult, 5> BuildResult_values = {
static constexpr std::array<BuildResult, 5> BUILD_RESULT_VALUES = {
BuildResult::SUCCEEDED,
BuildResult::BUILD_FAILED,
BuildResult::POST_BUILD_CHECKS_FAILED,
@ -143,7 +142,7 @@ namespace vcpkg::Build
COUNT,
};
constexpr std::array<BuildPolicy, size_t(BuildPolicy::COUNT)> g_all_policies = {
constexpr std::array<BuildPolicy, size_t(BuildPolicy::COUNT)> G_ALL_POLICIES = {
BuildPolicy::EMPTY_PACKAGE,
BuildPolicy::DLLS_WITHOUT_LIBS,
BuildPolicy::ONLY_RELEASE_CRT,
@ -159,7 +158,7 @@ namespace vcpkg::Build
BuildPolicies() = default;
BuildPolicies(std::map<BuildPolicy, bool>&& map) : m_policies(std::move(map)) {}
inline bool is_enabled(BuildPolicy policy) const
bool is_enabled(BuildPolicy policy) const
{
const auto it = m_policies.find(policy);
if (it != m_policies.cend()) return it->second;

View File

@ -77,7 +77,7 @@ namespace vcpkg::Commands::CI
}
std::map<BuildResult, int> summary;
for (const BuildResult& v : Build::BuildResult_values)
for (const BuildResult& v : Build::BUILD_RESULT_VALUES)
{
summary[v] = 0;
}

View File

@ -289,7 +289,7 @@ namespace vcpkg::Build
if (!version.empty()) build_info.version = std::move(version);
std::map<BuildPolicy, bool> policies;
for (auto policy : g_all_policies)
for (auto policy : G_ALL_POLICIES)
{
const auto setting = parser.optional_field(to_string(policy));
if (setting.empty()) continue;