[vcpkg_Build.h] Naming scheme, unneeded #include, unneeded inline
MODIFY
include/vcpkg_Build.h
include/vcpkg_Build.h
#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;

MODIFY
src/commands_ci.cpp
src/commands_ci.cpp
@@ -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;
}

MODIFY
src/vcpkg_Build.cpp
src/vcpkg_Build.cpp
@@ -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;

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