Eliminate unnecessary warnings on MSVC (catch)

Mostly caused by catch
This commit is contained in:
Jason Turner
2015-04-23 16:27:43 -06:00
parent 0e41e373c6
commit ddc6ac8e00
2 changed files with 14 additions and 2 deletions

View File

@@ -811,6 +811,12 @@ namespace chaiscript
return false;
}
#ifdef CHAISCRIPT_MSVC
// MSVC is unable to recognize that "rethrow_exception" causes the function to return
// so we must disable it here.
#pragma warning(push)
#pragma warning(disable : 4715)
#endif
Boxed_Value call_member(const std::string &t_name, const std::vector<Boxed_Value> &params, bool t_has_params) const
{
const auto funs = get_function(t_name);
@@ -887,6 +893,11 @@ namespace chaiscript
}
}
}
#ifdef CHAISCRIPT_MSVC
#pragma warning(pop)
#endif
Boxed_Value call_function(const std::string &t_name, const std::vector<Boxed_Value> &params) const
{