Work around coverity crash

I'm not 100% convinced on these changes, but they might be for the
better.
This commit is contained in:
Jason Turner
2015-05-30 07:33:34 -06:00
parent 70326a5dff
commit bb0d100513
3 changed files with 50 additions and 51 deletions

View File

@@ -1175,8 +1175,13 @@ namespace chaiscript
const auto lhssize = lhsparamtypes.size();
const auto rhssize = rhsparamtypes.size();
CHAISCRIPT_CONSTEXPR auto boxed_type = user_type<Boxed_Value>();
CHAISCRIPT_CONSTEXPR auto boxed_pod_type = user_type<Boxed_Number>();
#ifdef CHAISCRIPT_HAS_MAGIC_STATICS
auto boxed_type = user_type<Boxed_Value>();
auto boxed_pod_type = user_type<Boxed_Number>();
#else
static auto boxed_type = user_type<Boxed_Value>();
static auto boxed_pod_type = user_type<Boxed_Number>();
#endif
for (size_t i = 1; i < lhssize && i < rhssize; ++i)
{