aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Enums.cpp
diff options
context:
space:
mode:
authorThomas Fussell <thomas.fussell@gmail.com>2017-03-12 17:44:06 -0400
committerThomas Fussell <thomas.fussell@gmail.com>2017-03-12 17:44:06 -0400
commit2f42035ab43dd50cd863b51944aa099a99ae60f0 (patch)
tree4b6cfd43955e946721c58028fd8564c861d5c331 /toolsrc/src/vcpkg_Enums.cpp
parente02e85626f3206feda86a6f5757009005e0cfe3e (diff)
parent1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff)
downloadvcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.tar.gz
vcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.zip
Merge branch 'master' of git://github.com/Microsoft/vcpkg
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);
+ }
+}