Mark game_events::manager::execute_on_events() as noexcept
The function relies on never throwing exceptions in order for cleanup of disabled events to work. Best to enforce that requirement.
This commit is contained in:
parent
b6fa4740f3
commit
45cab78cfb
2 changed files with 3 additions and 2 deletions
|
@ -117,7 +117,7 @@ void manager::write_events(config& cfg) const
|
|||
wml_menu_items_.to_config(cfg);
|
||||
}
|
||||
|
||||
void manager::execute_on_events(const std::string& event_id, manager::event_func_t func)
|
||||
void manager::execute_on_events(const std::string& event_id, manager::event_func_t func) NOEXCEPT
|
||||
{
|
||||
const std::string standardized_event_id = event_handlers::standardize_name(event_id);
|
||||
const game_data* gd = resources::gamedata;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "game_events/fwd.hpp"
|
||||
#include "game_events/wmi_manager.hpp"
|
||||
#include "config.hpp"
|
||||
#include "global.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <set>
|
||||
|
@ -71,7 +72,7 @@ public:
|
|||
void write_events(config& cfg) const;
|
||||
|
||||
using event_func_t = std::function<void(game_events::manager&, handler_ptr&)>;
|
||||
void execute_on_events(const std::string& event_id, event_func_t func);
|
||||
void execute_on_events(const std::string& event_id, event_func_t func) NOEXCEPT;
|
||||
|
||||
game_events::wml_event_pump& pump();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue