diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-09 18:26:16 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-10 14:00:11 -0800 |
| commit | 47a4bff2d11881f95bd0eb0b659360ff1b7465c0 (patch) | |
| tree | 6f0bd80f1ccd881822c397d5922a8de2168a7762 /toolsrc/src | |
| parent | a0696395afddf492968a76ac38b1c8f14aba0e1f (diff) | |
| download | vcpkg-47a4bff2d11881f95bd0eb0b659360ff1b7465c0.tar.gz vcpkg-47a4bff2d11881f95bd0eb0b659360ff1b7465c0.zip | |
Add vcpkg_Enums
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg_Enums.cpp | 21 |
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); + } +} |
