Mark wml_exception::show const and formula_ai::handle_exception's argument const
(cherry-picked from commit 74f86aea1d
)
This commit is contained in:
parent
f58a7c06ef
commit
cefbad9b1e
4 changed files with 6 additions and 6 deletions
|
@ -114,12 +114,12 @@ formula_ai::formula_ai(readonly_context &context, const config &cfg)
|
|||
LOG_AI << "creating new formula ai"<< std::endl;
|
||||
}
|
||||
|
||||
void formula_ai::handle_exception(formula_error& e) const
|
||||
void formula_ai::handle_exception(const formula_error& e) const
|
||||
{
|
||||
handle_exception(e, "Error while parsing formula");
|
||||
}
|
||||
|
||||
void formula_ai::handle_exception(formula_error& e, const std::string& failed_operation) const
|
||||
void formula_ai::handle_exception(const formula_error& e, const std::string& failed_operation) const
|
||||
{
|
||||
LOG_AI << failed_operation << ": " << e.formula << std::endl;
|
||||
display_message(failed_operation + ": " + e.formula);
|
||||
|
|
|
@ -118,8 +118,8 @@ public:
|
|||
// Check if given unit can reach another unit
|
||||
bool can_reach_unit(map_location unit_A, map_location unit_B) const;
|
||||
|
||||
void handle_exception(wfl::formula_error& e) const;
|
||||
void handle_exception(wfl::formula_error& e, const std::string& failed_operation) const;
|
||||
void handle_exception(const wfl::formula_error& e) const;
|
||||
void handle_exception(const wfl::formula_error& e, const std::string& failed_operation) const;
|
||||
|
||||
pathfind::teleport_map get_allowed_teleports(unit_map::iterator& unit_it) const;
|
||||
pathfind::plain_route shortest_path_calculator(const map_location& src, const map_location& dst, unit_map::iterator& unit_it, pathfind::teleport_map& allowed_teleports) const;
|
||||
|
|
|
@ -53,7 +53,7 @@ void throw_wml_exception(
|
|||
throw wml_exception(message, sstr.str());
|
||||
}
|
||||
|
||||
void wml_exception::show()
|
||||
void wml_exception::show() const
|
||||
{
|
||||
std::ostringstream sstr;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ struct wml_exception
|
|||
/**
|
||||
* Shows the error in a dialog.
|
||||
*/
|
||||
void show();
|
||||
void show() const;
|
||||
private:
|
||||
IMPLEMENT_LUA_JAILBREAK_EXCEPTION(wml_exception)
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue