fix a couple of g++s -Wnoexcept warnings

This commit is contained in:
Bernd Amend 2021-05-22 14:21:32 +02:00
parent 19929be684
commit e8e47173fb
4 changed files with 4 additions and 6 deletions

View File

@ -201,7 +201,7 @@ namespace chaiscript
m_engine.add(fun([this](const Boxed_Value &t_bv, const std::string &t_name){ set_global(t_bv, t_name); }), "set_global"); m_engine.add(fun([this](const Boxed_Value &t_bv, const std::string &t_name){ set_global(t_bv, t_name); }), "set_global");
// why this unused parameter to Namespace? // why this unused parameter to Namespace?
m_engine.add(fun([this](const std::string& t_namespace_name) { register_namespace([](Namespace& /*space*/) {}, t_namespace_name); import(t_namespace_name); }), "namespace"); m_engine.add(fun([this](const std::string& t_namespace_name) { register_namespace([] (Namespace& /*space*/) noexcept {}, t_namespace_name); import(t_namespace_name); }), "namespace");
m_engine.add(fun([this](const std::string& t_namespace_name) { import(t_namespace_name); }), "import"); m_engine.add(fun([this](const std::string& t_namespace_name) { import(t_namespace_name); }), "import");
} }

View File

@ -795,7 +795,7 @@ struct Object_Lifetime_Vector2
{ {
Object_Lifetime_Vector2() : x(0), y(0) {} Object_Lifetime_Vector2() : x(0), y(0) {}
Object_Lifetime_Vector2(T px, T py) : x(px), y(py) {} Object_Lifetime_Vector2(T px, T py) : x(px), y(py) {}
Object_Lifetime_Vector2(const Object_Lifetime_Vector2& cp) : x(cp.x), y(cp.y) {} Object_Lifetime_Vector2(const Object_Lifetime_Vector2& cp) noexcept : x(cp.x), y(cp.y) {}
Object_Lifetime_Vector2& operator+=(const Object_Lifetime_Vector2& vec_r) Object_Lifetime_Vector2& operator+=(const Object_Lifetime_Vector2& vec_r)
{ {

View File

@ -2,9 +2,7 @@
#include "multifile_test_module.hpp" #include "multifile_test_module.hpp"
Multi_Test_Module::Multi_Test_Module() Multi_Test_Module::Multi_Test_Module() noexcept = default;
{
}
int Multi_Test_Module::get_module_value() int Multi_Test_Module::get_module_value()
{ {

View File

@ -5,7 +5,7 @@ class Multi_Test_Module
public: public:
static int get_module_value(); static int get_module_value();
Multi_Test_Module(); Multi_Test_Module() noexcept;
chaiscript::ModulePtr get_module(); chaiscript::ModulePtr get_module();
}; };