aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Enums.cpp
diff options
context:
space:
mode:
authorJan HrubĂ˝ <jhruby.web@gmail.com>2017-03-13 08:56:05 +0100
committerGitHub <noreply@github.com>2017-03-13 08:56:05 +0100
commit665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch)
treef0167041edf71e90f2331b5025f603392a8de67a /toolsrc/src/vcpkg_Enums.cpp
parent1bec0fcb73073b5b1719f454c368a63f1bff625e (diff)
parent1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff)
downloadvcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz
vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip
Merge pull request #1 from Microsoft/master
pull
Diffstat (limited to 'toolsrc/src/vcpkg_Enums.cpp')
-rw-r--r--toolsrc/src/vcpkg_Enums.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp
new file mode 100644
index 000000000..5e698659d
--- /dev/null
+++ b/toolsrc/src/vcpkg_Enums.cpp
@@ -0,0 +1,21 @@
+#include "pch.h"
+#include "vcpkg_Enums.h"
+#include "vcpkg_Checks.h"
+
+namespace vcpkg::Enums
+{
+ std::string nullvalue_toString(const std::string& enum_name)
+ {
+ return Strings::format("%s_NULLVALUE", enum_name);
+ }
+
+ void nullvalue_used(const std::string& enum_name)
+ {
+ Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
+ }
+
+ void unreachable(const std::string& enum_name)
+ {
+ Checks::exit_with_message("Unreachable code for enum, %s", enum_name);
+ }
+}