From 84df5918ce731d4c69acaa4413dfea4676b9c589 Mon Sep 17 00:00:00 2001 From: Jose Rubio Date: Mon, 13 Jan 2020 12:43:44 +0100 Subject: [PATCH] Fix for warning C4062 in boxed_number: enumerator ... in switch of enum ... is not handled the warning is a false positive because all the posible combinations are handled in the multiple switch at "go" function. --- include/chaiscript/dispatchkit/boxed_number.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/chaiscript/dispatchkit/boxed_number.hpp b/include/chaiscript/dispatchkit/boxed_number.hpp index d133dbff..7aef45d8 100644 --- a/include/chaiscript/dispatchkit/boxed_number.hpp +++ b/include/chaiscript/dispatchkit/boxed_number.hpp @@ -49,6 +49,15 @@ namespace chaiscript #pragma warning(disable : 4244 4018 4389 4146 4365 4267 4242) #endif +// +// Disable the switch completeness warnings because they raise a false positive, in the +// operations. +// +#ifdef CHAISCRIPT_MSVC +#pragma warning(push) +#pragma warning(disable : 4062) +#endif + #ifdef __GNUC__ #pragma GCC diagnostic push