Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
This commit is contained in:

committed by
Michael Lutz

parent
31260e6625
commit
af7d9020a1
@@ -117,7 +117,7 @@ public:
|
||||
*lastof(this->visible) = true;
|
||||
}
|
||||
|
||||
void SetupSmallestSize(Window *w, bool init_array)
|
||||
void SetupSmallestSize(Window *w, bool init_array) override
|
||||
{
|
||||
/* Oh yeah, we ought to be findable! */
|
||||
w->nested_array[WID_NG_HEADER] = this;
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
this->smallest_x = this->head->smallest_x + this->tail->smallest_x; // First and last are always shown, rest not
|
||||
}
|
||||
|
||||
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl)
|
||||
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) override
|
||||
{
|
||||
assert(given_width >= this->smallest_x && given_height >= this->smallest_y);
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void Draw(const Window *w)
|
||||
void Draw(const Window *w) override
|
||||
{
|
||||
int i = 0;
|
||||
for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) {
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y)
|
||||
NWidgetCore *GetWidgetFromPos(int x, int y) override
|
||||
{
|
||||
if (!IsInsideBS(x, this->pos_x, this->current_x) || !IsInsideBS(y, this->pos_y, this->current_y)) return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user