aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/PostBuildLint_ConfigurationType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/PostBuildLint_ConfigurationType.cpp')
-rw-r--r--toolsrc/src/PostBuildLint_ConfigurationType.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/toolsrc/src/PostBuildLint_ConfigurationType.cpp b/toolsrc/src/PostBuildLint_ConfigurationType.cpp
index 9c3499cac..990b10a37 100644
--- a/toolsrc/src/PostBuildLint_ConfigurationType.cpp
+++ b/toolsrc/src/PostBuildLint_ConfigurationType.cpp
@@ -1,19 +1,26 @@
#include "pch.h"
#include "PostBuildLint_ConfigurationType.h"
-#include "vcpkg_Checks.h"
+#include "vcpkg_Enums.h"
-namespace vcpkg::PostBuildLint
+namespace vcpkg::PostBuildLint::ConfigurationType
{
- std::string to_string(const ConfigurationType& conf)
+ static const std::string NULLVALUE_STRING = Enums::nullvalue_toString(ENUM_NAME);
+
+ static const std::string NAME_DEBUG = "Debug";
+ static const std::string NAME_RELEASE = "Release";
+
+ const std::string& type::toString() const
{
- switch (conf)
+ switch (this->backing_enum)
{
- case ConfigurationType::DEBUG:
- return "Debug";
- case ConfigurationType::RELEASE:
- return "Release";
- default:
- Checks::unreachable();
+ case ConfigurationType::DEBUG:
+ return NAME_DEBUG;
+ case ConfigurationType::RELEASE:
+ return NAME_RELEASE;
+ case ConfigurationType::NULLVALUE:
+ return NULLVALUE_STRING;
+ default:
+ Enums::unreachable(ENUM_NAME);
}
}
}