diff --git a/src/config.cpp b/src/config.cpp index 24410966cfd0..9f346bf75b64 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -464,7 +464,6 @@ config& config::operator=(const config& cfg) return *this; } -#ifdef HAVE_CXX11 config::config(config &&cfg): values(std::move(cfg.values)), children(std::move(cfg.children)), @@ -478,7 +477,6 @@ config &config::operator=(config &&cfg) swap(cfg); return *this; } -#endif bool config::valid_id(const std::string& id) { diff --git a/src/config.hpp b/src/config.hpp index 6e819bf55209..7f214d3749d6 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -75,16 +75,6 @@ class config */ void check_valid(const config &cfg) const; -#ifndef HAVE_CXX11 - struct safe_bool_impl { void nonnull() {} }; - /** - * Used as the return type of the conversion operator for boolean contexts. - * Needed, since the compiler would otherwise consider the following - * conversion (C legacy): cfg["abc"] -> "abc"[bool(cfg)] -> 'b' - */ - typedef void (safe_bool_impl::*safe_bool)(); -#endif - public: // Create an empty node. config(); @@ -92,10 +82,8 @@ class config config(const config &); config &operator=(const config &); -#ifdef HAVE_CXX11 config(config &&); config &operator=(config &&); -#endif /** * Creates a config object with an empty child of name @a child. @@ -107,13 +95,8 @@ class config // Verifies that the string can be used as an attribute or tag name static bool valid_id(const std::string& id); -#ifdef HAVE_CXX11 explicit operator bool() const { return this != &invalid; } -#else - operator safe_bool() const - { return this != &invalid ? &safe_bool_impl::nonnull : NULL; } -#endif typedef std::vector child_list; typedef std::map child_map; diff --git a/src/fake_unit_ptr.hpp b/src/fake_unit_ptr.hpp index eecefbd680d3..0cb19e7cd378 100644 --- a/src/fake_unit_ptr.hpp +++ b/src/fake_unit_ptr.hpp @@ -67,24 +67,10 @@ private : internal_ptr unit_; //!< Internal unit pointer. fake_unit_manager * my_manager_; //!< Raw pointer to the manager. -#ifndef HAVE_CXX11 - struct safe_bool_impl { void nonnull() {} }; - /** - * Used as t he return type of the conversion operator for boolean contexts. - * Needed, since the compiler would otherwise consider the following - * conversion (C legacy): cfg["abc"] -> "abc"[bool(cfg)] -> 'b' - */ - typedef void (safe_bool_impl::*safe_bool)(); -#endif - public: -#ifdef HAVE_CXX11 + explicit operator bool() const { return unit_.get(); } -#else - operator safe_bool() const - { return unit_ ? &safe_bool_impl::nonnull : NULL; } -#endif }; #endif diff --git a/src/global.hpp b/src/global.hpp index 88960e89b2ae..83d5678971e9 100644 --- a/src/global.hpp +++ b/src/global.hpp @@ -43,30 +43,6 @@ #endif //_MSC_VER -/** - * Enable C++11 support in some parts of the code. - * - * These parts \em must also work without C++11, since Wesnoth still uses C++98 - * as the official C++ version. - * - * @note Older versions of GCC don't define the proper version for - * @c __cplusplus, but have their own test macro. That test is omitted since - * the amount of support for these compilers depends a lot on the exact - * compiler version. If you want to enable it for these compilers simply define - * the macro manually. - */ -#if (__cplusplus >= 201103L) -#define HAVE_CXX11 -#endif - -#ifdef HAVE_CXX11 -#define FINAL final -#define OVERRIDE override -#else -#define FINAL -#define OVERRIDE -#endif - #ifdef NDEBUG /* * Wesnoth uses asserts to avoid undefined behaviour. For example, to make sure diff --git a/src/gui/auxiliary/filter.hpp b/src/gui/auxiliary/filter.hpp index bff261cd9977..121fd26d443f 100644 --- a/src/gui/auxiliary/filter.hpp +++ b/src/gui/auxiliary/filter.hpp @@ -38,7 +38,6 @@ inline bool sort(const tpane::titem& lhs, const std::string& tag, const bool ascending) { -#ifdef HAVE_CXX11 if(ascending) { return lexical_cast(lhs.tags.at(tag)) < lexical_cast(rhs.tags.at(tag)); @@ -46,18 +45,6 @@ inline bool sort(const tpane::titem& lhs, return lexical_cast(lhs.tags.at(tag)) > lexical_cast(rhs.tags.at(tag)); } -#else - typedef std::map::const_iterator iterator; - iterator lhs_it = lhs.tags.find(tag), rhs_it = rhs.tags.find(tag); - if(lhs_it == lhs.tags.end() || rhs_it == rhs.tags.end()) { - throw std::out_of_range("Key »" + tag + "« doesn't exist."); - } - if(ascending) { - return lexical_cast(*lhs_it) < lexical_cast(*rhs_it); - } else { - return lexical_cast(*lhs_it) > lexical_cast(*rhs_it); - } -#endif } /** diff --git a/src/gui/widgets/button.hpp b/src/gui/widgets/button.hpp index 71bc06a84a40..d05276267b51 100644 --- a/src/gui/widgets/button.hpp +++ b/src/gui/widgets/button.hpp @@ -37,13 +37,13 @@ class tbutton : public tcontrol, public tclickable_ /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** Inherited from tclickable. */ void connect_click_handler(const event::tsignal_function& signal) @@ -96,7 +96,7 @@ class tbutton : public tcontrol, public tclickable_ int retval_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/combobox.hpp b/src/gui/widgets/combobox.hpp index 59eee15c7767..8dd55d164acc 100644 --- a/src/gui/widgets/combobox.hpp +++ b/src/gui/widgets/combobox.hpp @@ -36,13 +36,13 @@ class tcombobox : public tcontrol, public tselectable_ /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** Inherited from tclickable. */ void connect_click_handler(const event::tsignal_function& signal) @@ -69,13 +69,13 @@ class tcombobox : public tcontrol, public tselectable_ boost::function callback_state_change_; /** Inherited from tselectable_ */ - virtual unsigned get_value() const OVERRIDE { return selected_; } + virtual unsigned get_value() const override { return selected_; } /** Inherited from tselectable_ */ - virtual void set_value(const unsigned value ) OVERRIDE { set_selected(value); } + virtual void set_value(const unsigned value ) override { set_selected(value); } /** Inherited from tselectable_ */ - virtual unsigned num_states() const OVERRIDE { return values_.size(); } + virtual unsigned num_states() const override { return values_.size(); } /** Inherited from tselectable_ */ virtual void set_callback_state_change(boost::function callback) @@ -126,7 +126,7 @@ class tcombobox : public tcontrol, public tselectable_ boost::function selected_callback_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/container.hpp b/src/gui/widgets/container.hpp index f8fa9ef97367..41a069a1914a 100644 --- a/src/gui/widgets/container.hpp +++ b/src/gui/widgets/container.hpp @@ -53,7 +53,7 @@ class tcontainer_ : public tcontrol /***** ***** ***** ***** layout functions ***** ***** ***** *****/ /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** * Tries to reduce the width of a container. @@ -65,10 +65,10 @@ class tcontainer_ : public tcontrol void reduce_width(const unsigned maximum_width); /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See @ref twidget::demand_reduce_width. */ - virtual void demand_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void demand_reduce_width(const unsigned maximum_width) override; /** * Tries to reduce the height of a container. @@ -80,75 +80,75 @@ class tcontainer_ : public tcontrol void reduce_height(const unsigned maximum_height); /** See @ref twidget::request_reduce_height. */ - virtual void request_reduce_height(const unsigned maximum_height) OVERRIDE; + virtual void request_reduce_height(const unsigned maximum_height) override; /** See @ref twidget::demand_reduce_height. */ - virtual void demand_reduce_height(const unsigned maximum_height) OVERRIDE; + virtual void demand_reduce_height(const unsigned maximum_height) override; private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::can_wrap. */ - virtual bool can_wrap() const OVERRIDE; + virtual bool can_wrap() const override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref twidget::has_widget. */ - virtual bool has_widget(const twidget& widget) const OVERRIDE; + virtual bool has_widget(const twidget& widget) const override; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE; + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; protected: /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; public: /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** * See @ref twidget::create_walker. * * @todo Implement properly. */ - virtual iterator::twalker_* create_walker() OVERRIDE + virtual iterator::twalker_* create_walker() override { return NULL; } diff --git a/src/gui/widgets/control.hpp b/src/gui/widgets/control.hpp index b7d4d7ed727c..76a5b9530fc8 100644 --- a/src/gui/widgets/control.hpp +++ b/src/gui/widgets/control.hpp @@ -97,10 +97,10 @@ class tcontrol : public twidget * The default behavior is that a widget blocks easy close, if not it * should override this function. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** See @ref twidget::create_walker. */ - virtual iterator::twalker_* create_walker() OVERRIDE; + virtual iterator::twalker_* create_walker() override; /***** ***** ***** ***** layout functions ***** ***** ***** *****/ @@ -171,18 +171,18 @@ class tcontrol : public twidget * @todo Also handle the tooltip state. * Handle if shrunken_ && use_tooltip_on_label_overflow_. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; protected: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /***** ***** ***** ***** Inherited ***** ***** ***** *****/ @@ -211,18 +211,18 @@ class tcontrol : public twidget public: /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** * Sets the definition. @@ -432,12 +432,12 @@ class tcontrol : public twidget /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::impl_draw_foreground. */ virtual void impl_draw_foreground(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** Exposes font::ttext::get_token, for the text label of this control */ std::string get_label_token(const gui2::tpoint & position, const char * delimiters = " \n\r\t") const; @@ -521,7 +521,7 @@ struct tbuilder_control : public tbuilder_widget using tbuilder_widget::build; - virtual twidget* build(const treplacements& replacements) const OVERRIDE; + virtual twidget* build(const treplacements& replacements) const override; /** @deprecated The control can initialize itself. */ void init_control(tcontrol* control) const; diff --git a/src/gui/widgets/drawing.hpp b/src/gui/widgets/drawing.hpp index b607f0c46bbb..f39413463d9e 100644 --- a/src/gui/widgets/drawing.hpp +++ b/src/gui/widgets/drawing.hpp @@ -42,22 +42,22 @@ class tdrawing : public tcontrol private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -82,7 +82,7 @@ class tdrawing : public tcontrol tpoint best_size_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/generator.hpp b/src/gui/widgets/generator.hpp index 1bc06ce110c8..1710a8529a09 100644 --- a/src/gui/widgets/generator.hpp +++ b/src/gui/widgets/generator.hpp @@ -247,48 +247,48 @@ class tgenerator_ : public twidget */ /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE = 0; + virtual void layout_initialise(const bool full_initialisation) override = 0; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE + virtual void request_reduce_width(const unsigned maximum_width) override = 0; /** See @ref twidget::request_reduce_height. */ - virtual void request_reduce_height(const unsigned maximum_height) OVERRIDE + virtual void request_reduce_height(const unsigned maximum_height) override = 0; /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE = 0; + virtual tpoint calculate_best_size() const override = 0; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE = 0; + virtual void place(const tpoint& origin, const tpoint& size) override = 0; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE = 0; + virtual void set_origin(const tpoint& origin) override = 0; /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE = 0; + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override = 0; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE = 0; + int y_offset) override = 0; protected: /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE + const std::vector& call_stack) override = 0; public: /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE = 0; + const bool must_be_active) override = 0; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE + const bool must_be_active) const override = 0; /***** ***** ***** ***** keyboard functions ***** ***** ***** *****/ diff --git a/src/gui/widgets/generator_private.hpp b/src/gui/widgets/generator_private.hpp index 8a75314439b6..afed64a7c583 100644 --- a/src/gui/widgets/generator_private.hpp +++ b/src/gui/widgets/generator_private.hpp @@ -144,7 +144,7 @@ struct tone : public virtual tgenerator_ * * @param index The item to select. */ - void select_item(const unsigned index, const bool select) OVERRIDE + void select_item(const unsigned index, const bool select) override { assert(select); @@ -161,7 +161,7 @@ struct tone : public virtual tgenerator_ struct tinfinite : public virtual tgenerator_ { /** See tone::select_item(). */ - void select_item(const unsigned index, const bool select) OVERRIDE + void select_item(const unsigned index, const bool select) override { assert(select); @@ -195,26 +195,26 @@ struct thorizontal_list : public virtual tgenerator_ using tgenerator_::create_item; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned /*maximum_width*/) OVERRIDE + virtual void request_reduce_width(const unsigned /*maximum_width*/) override { /* DO NOTHING */ } /** See @ref twidget::request_reduce_height. */ virtual void request_reduce_height(const unsigned /*maximum_height*/) - OVERRIDE + override { /* DO NOTHING */ } /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** * Sets the visible rectangle of the generator. @@ -225,11 +225,11 @@ struct thorizontal_list : public virtual tgenerator_ /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /***** ***** ***** ***** keyboard functions ***** ***** ***** *****/ @@ -274,37 +274,37 @@ struct tvertical_list : public virtual tgenerator_ using tgenerator_::create_item; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned /*maximum_width*/) OVERRIDE + virtual void request_reduce_width(const unsigned /*maximum_width*/) override { /* DO NOTHING */ } /** See @ref twidget::request_reduce_height. */ virtual void request_reduce_height(const unsigned /*maximum_height*/) - OVERRIDE + override { /* DO NOTHING */ } /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref thorizontal_list::set_visible_rectangle(). */ void set_visible_rectangle(const SDL_Rect& rectangle); /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /***** ***** ***** ***** keyboard functions ***** ***** ***** *****/ @@ -360,20 +360,20 @@ struct tmatrix : public virtual tgenerator_ using tgenerator_::create_item; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned /*maximum_width*/) OVERRIDE + virtual void request_reduce_width(const unsigned /*maximum_width*/) override { /* DO NOTHING */ } /** See @ref twidget::request_reduce_height. */ virtual void request_reduce_height(const unsigned /*maximum_height*/) - OVERRIDE + override { /* DO NOTHING */ } /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE + virtual tpoint calculate_best_size() const override { ERROR_LOG(false); } @@ -381,13 +381,13 @@ struct tmatrix : public virtual tgenerator_ /** See @ref twidget::place. */ virtual void place(const tpoint& /*origin*/ , - const tpoint& /*size*/) OVERRIDE + const tpoint& /*size*/) override { ERROR_LOG(false); } /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& /*origin*/) OVERRIDE + virtual void set_origin(const tpoint& /*origin*/) override { ERROR_LOG(false); } @@ -401,7 +401,7 @@ struct tmatrix : public virtual tgenerator_ /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& /*coordinate*/ , - const bool /*must_be_active*/) OVERRIDE + const bool /*must_be_active*/) override { ERROR_LOG(false); } @@ -409,7 +409,7 @@ struct tmatrix : public virtual tgenerator_ /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& /*coordinate*/ , - const bool /*must_be_active*/) const OVERRIDE + const bool /*must_be_active*/) const override { ERROR_LOG(false); } @@ -460,37 +460,37 @@ struct tindependent : public virtual tgenerator_ using tgenerator_::create_item; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See thorizontal_list::request_reduce_height. */ virtual void request_reduce_height(const unsigned maximum_height); /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref thorizontal_list::set_visible_rectangle(). */ void set_visible_rectangle(const SDL_Rect& rectangle); /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /***** ***** ***** ***** keyboard functions ***** ***** ***** *****/ @@ -818,7 +818,7 @@ class tgenerator : public minimum_selection, } /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE + virtual void layout_initialise(const bool full_initialisation) override { FOREACH(AUTO item, items_) { @@ -831,25 +831,25 @@ class tgenerator : public minimum_selection, } /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE + virtual void request_reduce_width(const unsigned maximum_width) override { placement::request_reduce_width(maximum_width); } /** See @ref twidget::request_reduce_height. */ - virtual void request_reduce_height(const unsigned maximum_height) OVERRIDE + virtual void request_reduce_height(const unsigned maximum_height) override { placement::request_reduce_height(maximum_height); } /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE + virtual tpoint calculate_best_size() const override { return placement::calculate_best_size(); } /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE + virtual void place(const tpoint& origin, const tpoint& size) override { // Inherited, so we get useful debug info. twidget::place(origin, size); @@ -858,7 +858,7 @@ class tgenerator : public minimum_selection, } /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE + virtual void set_origin(const tpoint& origin) override { // Inherited. twidget::set_origin(origin); @@ -867,7 +867,7 @@ class tgenerator : public minimum_selection, } /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override { placement::set_visible_rectangle(rectangle); } @@ -875,7 +875,7 @@ class tgenerator : public minimum_selection, /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE + int y_offset) override { assert(this->get_visible() == twidget::tvisible::visible); calculate_order(); @@ -893,7 +893,7 @@ class tgenerator : public minimum_selection, /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE + const std::vector& call_stack) override { FOREACH(AUTO item, items_) { @@ -904,20 +904,20 @@ class tgenerator : public minimum_selection, /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE + const bool must_be_active) override { return placement::find_at(coordinate, must_be_active); } /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE + const bool must_be_active) const override { return placement::find_at(coordinate, must_be_active); } /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE + bool disable_click_dismiss() const override { FOREACH(AUTO item, items_) { @@ -933,7 +933,7 @@ class tgenerator : public minimum_selection, * * @todo Implement properly. */ - virtual iterator::twalker_* create_walker() OVERRIDE + virtual iterator::twalker_* create_walker() override { return NULL; } @@ -1031,7 +1031,7 @@ class tgenerator : public minimum_selection, torder_func order_func_; - virtual void set_order(const torder_func& order) OVERRIDE + virtual void set_order(const torder_func& order) override { order_func_ = order; order_dirty_ = true; diff --git a/src/gui/widgets/grid.hpp b/src/gui/widgets/grid.hpp index 622abee4a793..24b32d8070a5 100644 --- a/src/gui/widgets/grid.hpp +++ b/src/gui/widgets/grid.hpp @@ -184,11 +184,11 @@ class tgrid : public twidget return child(row, col).widget(); } - virtual bool can_mouse_focus() const OVERRIDE { return false; } + virtual bool can_mouse_focus() const override { return false; } /***** ***** ***** ***** layout functions ***** ***** ***** *****/ /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** * Tries to reduce the width of a container. @@ -200,10 +200,10 @@ class tgrid : public twidget void reduce_width(const unsigned maximum_width); /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See @ref twidget::demand_reduce_width. */ - virtual void demand_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void demand_reduce_width(const unsigned maximum_width) override; /** * Tries to reduce the height of a container. @@ -215,10 +215,10 @@ class tgrid : public twidget void reduce_height(const unsigned maximum_height); /** See @ref twidget::request_reduce_height. */ - virtual void request_reduce_height(const unsigned maximum_height) OVERRIDE; + virtual void request_reduce_height(const unsigned maximum_height) override; /** See @ref twidget::demand_reduce_height. */ - virtual void demand_reduce_height(const unsigned maximum_height) OVERRIDE; + virtual void demand_reduce_height(const unsigned maximum_height) override; /** * Recalculates the best size. @@ -232,55 +232,55 @@ class tgrid : public twidget private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::can_wrap. */ - virtual bool can_wrap() const OVERRIDE; + virtual bool can_wrap() const override; public: /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE; + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override; /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::has_widget. */ - virtual bool has_widget(const twidget& widget) const OVERRIDE; + virtual bool has_widget(const twidget& widget) const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** See @ref twidget::create_walker. */ - virtual iterator::twalker_* create_walker() OVERRIDE; + virtual iterator::twalker_* create_walker() override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -489,7 +489,7 @@ class tgrid : public twidget /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; }; /** diff --git a/src/gui/widgets/group.hpp b/src/gui/widgets/group.hpp index ddde6a47e874..de4e370e23ff 100644 --- a/src/gui/widgets/group.hpp +++ b/src/gui/widgets/group.hpp @@ -53,16 +53,8 @@ class tgroup */ void remove_member(tselectable_* widget) { -#ifdef HAVE_CXX11 members_.erase(std::find_if(members_.begin(), members_.end(), [&widget](const group_type& member){ return member.first == widget; })); -#else - for(group_iterator iter = members_.end() - 1; iter >= members_.begin(); iter--) { - if(iter->first == widget) { - iter = members_.erase(iter); - } - } -#endif } /** diff --git a/src/gui/widgets/horizontal_scrollbar.hpp b/src/gui/widgets/horizontal_scrollbar.hpp index 0d64c249c476..6b4716a1d61c 100644 --- a/src/gui/widgets/horizontal_scrollbar.hpp +++ b/src/gui/widgets/horizontal_scrollbar.hpp @@ -69,7 +69,7 @@ class thorizontal_scrollbar : public tscrollbar_ } /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/image.hpp b/src/gui/widgets/image.hpp index efb2d7e6f61b..7dd94fdbaf69 100644 --- a/src/gui/widgets/image.hpp +++ b/src/gui/widgets/image.hpp @@ -59,28 +59,28 @@ class timage : public tcontrol return label(); } - virtual bool can_mouse_focus() const OVERRIDE { return false; } + virtual bool can_mouse_focus() const override { return false; } /***** ***** ***** ***** layout functions ***** ***** ***** *****/ private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; private: /** @@ -94,7 +94,7 @@ class timage : public tcontrol }; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/label.hpp b/src/gui/widgets/label.hpp index 7558ff1bccac..b45fad6313bd 100644 --- a/src/gui/widgets/label.hpp +++ b/src/gui/widgets/label.hpp @@ -32,28 +32,28 @@ class tlabel : public tcontrol tlabel(); /** See @ref twidget::can_wrap. */ - virtual bool can_wrap() const OVERRIDE; + virtual bool can_wrap() const override; /** See @ref tcontrol::get_characters_per_line. */ - virtual unsigned get_characters_per_line() const OVERRIDE; + virtual unsigned get_characters_per_line() const override; /** See @ref tcontrol::get_link_aware. */ - virtual bool get_link_aware() const OVERRIDE; + virtual bool get_link_aware() const override; /** See @ref tcontrol::get_link_aware. */ - virtual std::string get_link_color() const OVERRIDE; + virtual std::string get_link_color() const override; /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -68,7 +68,7 @@ class tlabel : public tcontrol void set_link_color(const std::string & color); - virtual bool can_mouse_focus() const OVERRIDE { return false; } + virtual bool can_mouse_focus() const override { return false; } private: /** * Possible states of the widget. @@ -113,7 +113,7 @@ class tlabel : public tcontrol std::string link_color_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** Inherited from tcontrol. */ void load_config_extra(); diff --git a/src/gui/widgets/list.hpp b/src/gui/widgets/list.hpp index c0e6817db171..7efa4bc10055 100644 --- a/src/gui/widgets/list.hpp +++ b/src/gui/widgets/list.hpp @@ -201,13 +201,13 @@ class tlist : public tcontainer_ void init(); /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; private: /** @@ -269,10 +269,10 @@ class tlist : public tcontainer_ virtual void set_content_size(const tpoint& origin, const tpoint& size); #endif /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/listbox.hpp b/src/gui/widgets/listbox.hpp index 92858ded5500..f3b8e58be313 100644 --- a/src/gui/widgets/listbox.hpp +++ b/src/gui/widgets/listbox.hpp @@ -183,7 +183,7 @@ class tlistbox : public tscrollbar_container void list_item_clicked(twidget& caller); /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; /** * Request to update the size of the content after changing the content. @@ -204,15 +204,15 @@ class tlistbox : public tscrollbar_container /***** ***** ***** ***** inherited ***** ***** ****** *****/ /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /***** ***** ***** setters / getters for members ***** ****** *****/ void @@ -346,7 +346,7 @@ class tlistbox : public tscrollbar_container virtual void set_content_size(const tpoint& origin, const tpoint& size); /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; void order_by_column(unsigned column, twidget& widget); }; diff --git a/src/gui/widgets/matrix.hpp b/src/gui/widgets/matrix.hpp index f18f303ea19b..9ad9b9e8530c 100644 --- a/src/gui/widgets/matrix.hpp +++ b/src/gui/widgets/matrix.hpp @@ -77,19 +77,19 @@ class tcontrol_NEW : public tcontrol, public STATE } /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE + virtual void set_active(const bool active) override { STATE::set_active(active); } /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE + virtual bool get_active() const override { return STATE::get_active(); } /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE + virtual unsigned get_state() const override { return STATE::get_state(); } @@ -117,41 +117,41 @@ class tmatrix : public tbase /***** ***** ***** ***** Inherited operations. ***** ***** ****** *****/ /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /***** ***** ***** ***** Forwarded to pane_. ***** ***** ****** *****/ /** @@ -182,14 +182,14 @@ class tmatrix : public tbase private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** See @ref twidget::create_walker. */ - virtual iterator::twalker_* create_walker() OVERRIDE; + virtual iterator::twalker_* create_walker() override; /** * Returns a grid in the pane. @@ -227,7 +227,7 @@ class tmatrix : public tbase tpane* pane_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/minimap.hpp b/src/gui/widgets/minimap.hpp index 4bcef13f5336..8de2bc4b6469 100644 --- a/src/gui/widgets/minimap.hpp +++ b/src/gui/widgets/minimap.hpp @@ -43,16 +43,16 @@ class tminimap : public tcontrol /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -103,10 +103,10 @@ class tminimap : public tcontrol /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/multi_page.hpp b/src/gui/widgets/multi_page.hpp index 810a8d98b23e..676890d6a20b 100644 --- a/src/gui/widgets/multi_page.hpp +++ b/src/gui/widgets/multi_page.hpp @@ -127,10 +127,10 @@ class tmulti_page : public tcontainer_ /***** ***** ***** inherited ***** ****** *****/ /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -162,13 +162,13 @@ class tmulti_page : public tcontainer_ /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/pane.hpp b/src/gui/widgets/pane.hpp index 77beb0e60b79..b7495fbfae0b 100644 --- a/src/gui/widgets/pane.hpp +++ b/src/gui/widgets/pane.hpp @@ -71,31 +71,31 @@ class tpane : public twidget const std::map& tags); /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** * Sorts the contents of the pane. @@ -117,14 +117,14 @@ class tpane : public twidget private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** See @ref twidget::create_walker. */ - virtual iterator::twalker_* create_walker() OVERRIDE; + virtual iterator::twalker_* create_walker() override; /** * Returns a grid in the pane. diff --git a/src/gui/widgets/panel.hpp b/src/gui/widgets/panel.hpp index 69fe145e334e..05387ecb459b 100644 --- a/src/gui/widgets/panel.hpp +++ b/src/gui/widgets/panel.hpp @@ -45,33 +45,33 @@ class tpanel : public tcontainer_ } /** See @ref tcontainer_::get_client_rect. */ - virtual SDL_Rect get_client_rect() const OVERRIDE; + virtual SDL_Rect get_client_rect() const override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; private: /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::impl_draw_foreground. */ virtual void impl_draw_foreground(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** See @ref tcontainer_::border_space. */ - virtual tpoint border_space() const OVERRIDE; + virtual tpoint border_space() const override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/password_box.hpp b/src/gui/widgets/password_box.hpp index 3fda9966820f..825f34d78f07 100644 --- a/src/gui/widgets/password_box.hpp +++ b/src/gui/widgets/password_box.hpp @@ -85,7 +85,7 @@ class tpassword_box : public ttext_box std::string real_value_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- BUILDER -----------{ diff --git a/src/gui/widgets/progress_bar.hpp b/src/gui/widgets/progress_bar.hpp index 145838a6fd50..a4e903c31db7 100644 --- a/src/gui/widgets/progress_bar.hpp +++ b/src/gui/widgets/progress_bar.hpp @@ -37,16 +37,16 @@ class tprogress_bar : public tcontrol /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -72,7 +72,7 @@ class tprogress_bar : public tcontrol unsigned percentage_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/repeating_button.hpp b/src/gui/widgets/repeating_button.hpp index 7b02b1ddfc1e..2fa0896f1fe8 100644 --- a/src/gui/widgets/repeating_button.hpp +++ b/src/gui/widgets/repeating_button.hpp @@ -54,13 +54,13 @@ class trepeating_button : public tcontrol, public tclickable_ /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** Inherited from tclickable. */ void connect_click_handler(const event::tsignal_function& signal) @@ -101,7 +101,7 @@ class trepeating_button : public tcontrol, public tclickable_ size_t repeat_timer_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/scroll_label.hpp b/src/gui/widgets/scroll_label.hpp index 781ea8c4fece..0344dbff3207 100644 --- a/src/gui/widgets/scroll_label.hpp +++ b/src/gui/widgets/scroll_label.hpp @@ -48,21 +48,21 @@ class tscroll_label : public tscrollbar_container tscroll_label(bool wrap); /** See @ref tcontrol::set_label. */ - virtual void set_label(const t_string& label) OVERRIDE; + virtual void set_label(const t_string& label) override; /** See @ref tcontrol::set_use_markup. */ - virtual void set_use_markup(bool use_markup) OVERRIDE; + virtual void set_use_markup(bool use_markup) override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; /***** ***** ***** setters / getters for members ***** ****** *****/ /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; bool can_wrap() const; void set_can_wrap(bool can_wrap); @@ -96,7 +96,7 @@ class tscroll_label : public tscrollbar_container /***** ***** ***** inherited ****** *****/ /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/scrollbar.hpp b/src/gui/widgets/scrollbar.hpp index a106db02abba..4983568254e9 100644 --- a/src/gui/widgets/scrollbar.hpp +++ b/src/gui/widgets/scrollbar.hpp @@ -98,18 +98,18 @@ class tscrollbar_ : public tcontrol /***** ***** ***** ***** layout functions ***** ***** ***** *****/ /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -169,7 +169,7 @@ class tscrollbar_ : public tcontrol * * After a recalculation the canvasses also need to be updated. */ - virtual void update_canvas() OVERRIDE; + virtual void update_canvas() override; /** * Callback for subclasses to get notified about positioner movement. diff --git a/src/gui/widgets/scrollbar_container.hpp b/src/gui/widgets/scrollbar_container.hpp index 3d0d676951c1..5a3dd5f43aec 100644 --- a/src/gui/widgets/scrollbar_container.hpp +++ b/src/gui/widgets/scrollbar_container.hpp @@ -88,60 +88,60 @@ class tscrollbar_container : public tcontainer_ /***** ***** ***** ***** layout functions ***** ***** ***** *****/ /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** See @ref twidget::request_reduce_height. */ - virtual void request_reduce_height(const unsigned maximum_height) OVERRIDE; + virtual void request_reduce_height(const unsigned maximum_height) override; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** * See @ref twidget::can_wrap. * * @note This function is called before the object is finalised. */ - virtual bool can_wrap() const OVERRIDE; + virtual bool can_wrap() const override; private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE; + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override; /***** ***** ***** inherited ****** *****/ /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -493,17 +493,17 @@ class tscrollbar_container : public tcontainer_ } /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** * Sets the size of the content grid. @@ -520,7 +520,7 @@ class tscrollbar_container : public tcontainer_ void scrollbar_moved(); /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/scrollbar_panel.hpp b/src/gui/widgets/scrollbar_panel.hpp index c2a5cdd25318..a4a91b3350bd 100644 --- a/src/gui/widgets/scrollbar_panel.hpp +++ b/src/gui/widgets/scrollbar_panel.hpp @@ -52,17 +52,17 @@ class tscrollbar_panel : public tscrollbar_container } /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; private: /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/slider.hpp b/src/gui/widgets/slider.hpp index e2f39e83fed0..636b82423417 100644 --- a/src/gui/widgets/slider.hpp +++ b/src/gui/widgets/slider.hpp @@ -36,7 +36,7 @@ class tslider : public tscrollbar_, public tinteger_selector_ private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /***** ***** ***** ***** Inherited ***** ***** ***** *****/ @@ -154,7 +154,7 @@ class tslider : public tscrollbar_, public tinteger_selector_ } /** See @ref tcontrol::update_canvas. */ - virtual void update_canvas() OVERRIDE; + virtual void update_canvas() override; /** * When the slider shows the minimum value can show a special text. @@ -177,7 +177,7 @@ class tslider : public tscrollbar_, public tinteger_selector_ tlabel_creator value_labels_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** * Handlers for keyboard input diff --git a/src/gui/widgets/spacer.hpp b/src/gui/widgets/spacer.hpp index 19a3bbfcb3c9..1dbe45a5ba2c 100644 --- a/src/gui/widgets/spacer.hpp +++ b/src/gui/widgets/spacer.hpp @@ -46,22 +46,22 @@ class tspacer : public tcontrol private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -77,10 +77,10 @@ class tspacer : public tcontrol /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/stacked_widget.hpp b/src/gui/widgets/stacked_widget.hpp index fe451d1c5b88..55c8f2e7cfb6 100644 --- a/src/gui/widgets/stacked_widget.hpp +++ b/src/gui/widgets/stacked_widget.hpp @@ -43,13 +43,13 @@ class tstacked_widget : public tcontainer_ /***** ***** ***** inherited ***** ****** *****/ /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /** * Gets the current visible layer number. @@ -104,10 +104,10 @@ class tstacked_widget : public tcontainer_ void select_layer_internal(const unsigned int layer, const bool select) const; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/text.hpp b/src/gui/widgets/text.hpp index 2ef2cbe5dee0..e28d4b6276cf 100644 --- a/src/gui/widgets/text.hpp +++ b/src/gui/widgets/text.hpp @@ -47,13 +47,13 @@ class ttext_ : public tcontrol ttext_(); /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /***** ***** ***** ***** expose some functions ***** ***** ***** *****/ diff --git a/src/gui/widgets/text_box.hpp b/src/gui/widgets/text_box.hpp index 3d38721fa2e8..dade3f1b1546 100644 --- a/src/gui/widgets/text_box.hpp +++ b/src/gui/widgets/text_box.hpp @@ -147,12 +147,12 @@ class ttext_box : public ttext_ /***** ***** ***** ***** layout functions ***** ***** ***** *****/ /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /***** ***** ***** ***** Inherited ***** ***** ***** *****/ /** See @ref tcontrol::update_canvas. */ - virtual void update_canvas() OVERRIDE; + virtual void update_canvas() override; /** Inherited from ttext_. */ void goto_end_of_line(const bool select = false) @@ -257,7 +257,7 @@ class ttext_box : public ttext_ void handle_key_clear_line(SDLMod modifier, bool& handled); /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** Inherited from tcontrol. */ void load_config_extra(); diff --git a/src/gui/widgets/toggle_button.hpp b/src/gui/widgets/toggle_button.hpp index cba0fa41e818..093afb75c3cc 100644 --- a/src/gui/widgets/toggle_button.hpp +++ b/src/gui/widgets/toggle_button.hpp @@ -40,24 +40,24 @@ class ttoggle_button : public tcontrol, public tselectable_ void set_members(const string_map& data); /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** Inherited from tcontrol. */ void update_canvas(); /** Inherited from tselectable_ */ - unsigned get_value() const OVERRIDE + unsigned get_value() const override { return state_num_; } /** Inherited from tselectable_ */ - unsigned num_states() const OVERRIDE; + unsigned num_states() const override; /** Inherited from tselectable_ */ void set_value(const unsigned selected); @@ -128,7 +128,7 @@ class ttoggle_button : public tcontrol, public tselectable_ std::string icon_name_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/toggle_panel.hpp b/src/gui/widgets/toggle_panel.hpp index 0f22c6259397..9ad9fb32f1e7 100644 --- a/src/gui/widgets/toggle_panel.hpp +++ b/src/gui/widgets/toggle_panel.hpp @@ -52,20 +52,20 @@ class ttoggle_panel : public tpanel, public tselectable_ /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; /** * See @ref tcontainer_::get_client_rect. @@ -74,7 +74,7 @@ class ttoggle_panel : public tpanel, public tselectable_ * tpanel_definition we need to override this function and do about the * same, look at a way to 'fix' that. */ - virtual SDL_Rect get_client_rect() const OVERRIDE; + virtual SDL_Rect get_client_rect() const override; /** * See @ref tcontainer_::border_space. @@ -83,10 +83,10 @@ class ttoggle_panel : public tpanel, public tselectable_ * tpanel_definition we need to override this function and do about the * same, look at a way to 'fix' that. */ - virtual tpoint border_space() const OVERRIDE; + virtual tpoint border_space() const override; /** Inherited from tselectable_ */ - unsigned get_value() const OVERRIDE + unsigned get_value() const override { return state_num_;; } @@ -95,7 +95,7 @@ class ttoggle_panel : public tpanel, public tselectable_ void set_value(const unsigned selected); /** Inherited from tselectable_ */ - unsigned num_states() const OVERRIDE; + unsigned num_states() const override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -161,15 +161,15 @@ class ttoggle_panel : public tpanel, public tselectable_ /** See @ref twidget::impl_draw_background. */ virtual void impl_draw_background(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::impl_draw_foreground. */ virtual void impl_draw_foreground(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/tree_view.hpp b/src/gui/widgets/tree_view.hpp index 3c4a38d36e04..ede8eb8b606d 100644 --- a/src/gui/widgets/tree_view.hpp +++ b/src/gui/widgets/tree_view.hpp @@ -62,15 +62,15 @@ class ttree_view : public tscrollbar_container /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; bool empty() const; /** See @ref twidget::layout_children. */ - virtual void layout_children() OVERRIDE; + virtual void layout_children() override; /***** ***** ***** setters / getters for members ***** ****** *****/ @@ -153,7 +153,7 @@ class ttree_view : public tscrollbar_container virtual void finalize_setup(); /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /***** ***** ***** signal handlers ***** ****** *****/ diff --git a/src/gui/widgets/tree_view_node.hpp b/src/gui/widgets/tree_view_node.hpp index 6727be0c5b0c..2f7c6139ae98 100644 --- a/src/gui/widgets/tree_view_node.hpp +++ b/src/gui/widgets/tree_view_node.hpp @@ -135,25 +135,25 @@ class ttree_view_node : public twidget * * @todo Implement properly. */ - virtual iterator::twalker_* create_walker() OVERRIDE + virtual iterator::twalker_* create_walker() override { return NULL; } /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** * The "size" of the widget. @@ -226,7 +226,7 @@ class ttree_view_node : public twidget int calculate_ypos(); /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** * Our parent node. @@ -277,10 +277,10 @@ class ttree_view_node : public twidget const std::vector& call_stack); /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; tpoint calculate_best_size(const int indention_level, const unsigned indention_step_size) const; @@ -290,21 +290,21 @@ class ttree_view_node : public twidget tpoint get_unfolded_size() const; /** See @ref twidget::set_origin. */ - virtual void set_origin(const tpoint& origin) OVERRIDE; + virtual void set_origin(const tpoint& origin) override; /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; unsigned place(const unsigned indention_step_size, tpoint origin, unsigned width); /** See @ref twidget::set_visible_rectangle. */ - virtual void set_visible_rectangle(const SDL_Rect& rectangle) OVERRIDE; + virtual void set_visible_rectangle(const SDL_Rect& rectangle) override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See tselectable_::set_callback_state_change. */ boost::function callback_state_change_; diff --git a/src/gui/widgets/unit_preview_pane.hpp b/src/gui/widgets/unit_preview_pane.hpp index 24db15c03f1a..db5d75461f08 100644 --- a/src/gui/widgets/unit_preview_pane.hpp +++ b/src/gui/widgets/unit_preview_pane.hpp @@ -66,13 +66,13 @@ class tunit_preview_pane : public tcontainer_ void profile_button_callback(); /** See @ref tcontrol::set_active. */ - virtual void set_active(const bool active) OVERRIDE; + virtual void set_active(const bool active) override; /** See @ref tcontrol::get_active. */ - virtual bool get_active() const OVERRIDE; + virtual bool get_active() const override; /** See @ref tcontrol::get_state. */ - virtual unsigned get_state() const OVERRIDE; + virtual unsigned get_state() const override; private: std::string current_type_; @@ -92,10 +92,10 @@ class tunit_preview_pane : public tcontainer_ }; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** See @ref tcontainer_::set_self_active. */ - virtual void set_self_active(const bool active) OVERRIDE; + virtual void set_self_active(const bool active) override; }; diff --git a/src/gui/widgets/vertical_scrollbar.hpp b/src/gui/widgets/vertical_scrollbar.hpp index 30bf912df748..fef0770869d4 100644 --- a/src/gui/widgets/vertical_scrollbar.hpp +++ b/src/gui/widgets/vertical_scrollbar.hpp @@ -66,7 +66,7 @@ class tvertical_scrollbar : public tscrollbar_ } /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; }; // }---------- DEFINITION ---------{ diff --git a/src/gui/widgets/viewport.hpp b/src/gui/widgets/viewport.hpp index 6b725cd8ff99..64a00750eb22 100644 --- a/src/gui/widgets/viewport.hpp +++ b/src/gui/widgets/viewport.hpp @@ -49,49 +49,49 @@ class tviewport : public twidget ~tviewport(); /** See @ref twidget::place. */ - virtual void place(const tpoint& origin, const tpoint& size) OVERRIDE; + virtual void place(const tpoint& origin, const tpoint& size) override; /** See @ref twidget::layout_initialise. */ - virtual void layout_initialise(const bool full_initialisation) OVERRIDE; + virtual void layout_initialise(const bool full_initialisation) override; /** See @ref twidget::impl_draw_children. */ virtual void impl_draw_children(surface& frame_buffer, int x_offset, - int y_offset) OVERRIDE; + int y_offset) override; /** See @ref twidget::child_populate_dirty_list. */ virtual void child_populate_dirty_list(twindow& caller, - const std::vector& call_stack) OVERRIDE; + const std::vector& call_stack) override; /** See @ref twidget::request_reduce_width. */ - virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE; + virtual void request_reduce_width(const unsigned maximum_width) override; /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; private: /** See @ref twidget::calculate_best_size. */ - virtual tpoint calculate_best_size() const OVERRIDE; + virtual tpoint calculate_best_size() const override; public: /** See @ref twidget::disable_click_dismiss. */ - bool disable_click_dismiss() const OVERRIDE; + bool disable_click_dismiss() const override; /** See @ref twidget::create_walker. */ - virtual iterator::twalker_* create_walker() OVERRIDE; + virtual iterator::twalker_* create_walker() override; private: twidget& widget_; diff --git a/src/gui/widgets/widget.hpp b/src/gui/widgets/widget.hpp index 7c1801078551..274286d96133 100644 --- a/src/gui/widgets/widget.hpp +++ b/src/gui/widgets/widget.hpp @@ -158,7 +158,7 @@ class twidget : private boost::noncopyable, */ explicit twidget(const tbuilder_widget& builder); - virtual ~twidget() OVERRIDE; + virtual ~twidget() override; /***** ***** ***** ***** ID functions. ***** ***** ***** *****/ @@ -801,7 +801,7 @@ class twidget : private boost::noncopyable, private: /** See @ref event::tdispatcher::is_at. */ - virtual bool is_at(const tpoint& coordinate) const OVERRIDE; + virtual bool is_at(const tpoint& coordinate) const override; /** * Is the coordinate inside our area. diff --git a/src/gui/widgets/window.hpp b/src/gui/widgets/window.hpp index 6700d0379145..f47baf942858 100644 --- a/src/gui/widgets/window.hpp +++ b/src/gui/widgets/window.hpp @@ -281,11 +281,11 @@ class twindow : public tpanel, public cursor::setter /** See @ref twidget::find_at. */ virtual twidget* find_at(const tpoint& coordinate, - const bool must_be_active) OVERRIDE; + const bool must_be_active) override; /** See @ref twidget::find_at. */ virtual const twidget* find_at(const tpoint& coordinate, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; /** Inherited from twidget. */ tdialog* dialog() @@ -294,11 +294,11 @@ class twindow : public tpanel, public cursor::setter } /** See @ref twidget::find. */ - twidget* find(const std::string& id, const bool must_be_active) OVERRIDE; + twidget* find(const std::string& id, const bool must_be_active) override; /** See @ref twidget::find. */ const twidget* find(const std::string& id, - const bool must_be_active) const OVERRIDE; + const bool must_be_active) const override; #if 0 /** @todo Implement these functions. */ @@ -669,7 +669,7 @@ class twindow : public tpanel, public cursor::setter Uint8 mouse_button_state_; /** See @ref tcontrol::get_control_type. */ - virtual const std::string& get_control_type() const OVERRIDE; + virtual const std::string& get_control_type() const override; /** * Inherited from tpanel. diff --git a/src/help/help_button.hpp b/src/help/help_button.hpp index 0692907fb5c7..9bd4c971894f 100644 --- a/src/help/help_button.hpp +++ b/src/help/help_button.hpp @@ -31,7 +31,7 @@ class help_button : public gui::dialog_button, public hotkey::command_executor { std::string topic() const { return topic_; } void join(); void leave(); - CVideo& get_video() OVERRIDE { return video_; } + CVideo& get_video() override { return video_; } private: void show_help(); bool can_execute_command(const hotkey::hotkey_command& command, int/*index*/ =-1) const; diff --git a/src/hotkey/hotkey_handler.hpp b/src/hotkey/hotkey_handler.hpp index 5e20a85b5414..2f6ffb114ccc 100644 --- a/src/hotkey/hotkey_handler.hpp +++ b/src/hotkey/hotkey_handler.hpp @@ -117,7 +117,7 @@ class play_controller::hotkey_handler : public hotkey::command_executor_default virtual void toggle_grid(); virtual void search(); virtual void toggle_accelerated_speed(); - virtual void replay_skip_animation() OVERRIDE + virtual void replay_skip_animation() override { return play_controller_.toggle_skipping_replay(); } virtual std::string get_action_image(hotkey::HOTKEY_COMMAND, int index) const; diff --git a/src/hotkey/hotkey_handler_sp.hpp b/src/hotkey/hotkey_handler_sp.hpp index 92e4c48a60a7..49f60ec8dbd9 100644 --- a/src/hotkey/hotkey_handler_sp.hpp +++ b/src/hotkey/hotkey_handler_sp.hpp @@ -77,25 +77,25 @@ class playsingle_controller::hotkey_handler : public play_controller::hotkey_han assert(playsingle_controller_.get_replay_controller()); return *playsingle_controller_.get_replay_controller(); } - virtual void stop_replay() OVERRIDE + virtual void stop_replay() override { return get_replay_controller().stop_replay(); } - virtual void play_replay() OVERRIDE + virtual void play_replay() override { return get_replay_controller().play_replay(); } - virtual void replay_next_turn() OVERRIDE + virtual void replay_next_turn() override { return get_replay_controller().replay_next_turn(); } - virtual void replay_next_side() OVERRIDE + virtual void replay_next_side() override { return get_replay_controller().replay_next_side(); } - virtual void replay_next_move() OVERRIDE + virtual void replay_next_move() override { return get_replay_controller().replay_next_move(); } - virtual void replay_show_everything() OVERRIDE + virtual void replay_show_everything() override { return get_replay_controller().replay_show_everything(); } - virtual void replay_show_each() OVERRIDE + virtual void replay_show_each() override { return get_replay_controller().replay_show_each(); } - virtual void replay_show_team1() OVERRIDE + virtual void replay_show_team1() override { return get_replay_controller().replay_show_team1(); } - virtual void reset_replay() OVERRIDE + virtual void reset_replay() override { return playsingle_controller_.reset_replay(); } - virtual void replay_exit() OVERRIDE; + virtual void replay_exit() override; virtual void load_autosave(const std::string& filename); virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const; }; diff --git a/src/play_controller.hpp b/src/play_controller.hpp index 1770bf255fd2..e76fbba2168a 100644 --- a/src/play_controller.hpp +++ b/src/play_controller.hpp @@ -214,7 +214,7 @@ class play_controller : public controller_base, public events::observer, public actions::undo_list& get_undo_stack() { return undo_stack(); } - bool is_browsing() const OVERRIDE; + bool is_browsing() const override; bool is_lingering() const { return linger_; } class hotkey_handler; diff --git a/src/replay_controller.hpp b/src/replay_controller.hpp index 27790a757fe9..4add7a3eb47a 100644 --- a/src/replay_controller.hpp +++ b/src/replay_controller.hpp @@ -62,7 +62,7 @@ class replay_controller : public events::observer void init(); void update_gui(); void rebuild_replay_theme(); - void handle_generic_event(const std::string& name) OVERRIDE; + void handle_generic_event(const std::string& name) override; void reset_replay_ui(); void update_replay_ui(); diff --git a/src/scripting/game_lua_kernel.cpp b/src/scripting/game_lua_kernel.cpp index 607a8c2f3a5a..266ebde035fe 100644 --- a/src/scripting/game_lua_kernel.cpp +++ b/src/scripting/game_lua_kernel.cpp @@ -2974,7 +2974,7 @@ namespace return cfg; } - virtual std::string description() const OVERRIDE + virtual std::string description() const override { return desc; } diff --git a/src/synced_checkup.cpp b/src/synced_checkup.cpp index 3ca256df110d..5d6df496e2dd 100644 --- a/src/synced_checkup.cpp +++ b/src/synced_checkup.cpp @@ -91,15 +91,15 @@ namespace virtual ~checkup_choice() { } - virtual config random_choice(int /*side*/) const OVERRIDE + virtual config random_choice(int /*side*/) const override { throw "not implemented"; } - virtual bool is_visible() const OVERRIDE + virtual bool is_visible() const override { return false; } - virtual config query_user(int /*side*/) const OVERRIDE + virtual config query_user(int /*side*/) const override { return cfg_; } diff --git a/src/variable.hpp b/src/variable.hpp index 59bd867900e9..a2b1264a1df9 100644 --- a/src/variable.hpp +++ b/src/variable.hpp @@ -66,13 +66,8 @@ class vconfig static vconfig empty_vconfig(); // Valid to dereference. Contains nothing static vconfig unconstructed_vconfig(); // Must not be dereferenced -#ifdef HAVE_CXX11 /// A vconfig evaluates to true iff it can be dereferenced. explicit operator bool() const { return !null(); } -#else - /// A vconfig evaluates to true iff it can be dereferenced. - operator safe_bool() const { return !null() ? &safe_bool_impl::nonnull : NULL; } -#endif bool null() const { assert(cfg_); return cfg_ == &default_empty_config; } void make_safe() const; //!< instruct the vconfig to make a private copy of its underlying data.