mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
Add override
keyword where applicable
This commit is contained in:
@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
void print(const std::string &text) const;
|
void print(const std::string &text) const;
|
||||||
BattleAction useCatapult(const CStack *stack);
|
BattleAction useCatapult(const CStack *stack);
|
||||||
void battleStart(const CCreatureSet * army1, const CCreatureSet * army2, int3 tile, const CGHeroInstance * hero1, const CGHeroInstance * hero2, bool Side);
|
void battleStart(const CCreatureSet * army1, const CCreatureSet * army2, int3 tile, const CGHeroInstance * hero1, const CGHeroInstance * hero2, bool Side) override;
|
||||||
//void actionFinished(const BattleAction &action) override;//occurs AFTER every action taken by any stack or by the hero
|
//void actionFinished(const BattleAction &action) override;//occurs AFTER every action taken by any stack or by the hero
|
||||||
//void actionStarted(const BattleAction &action) override;//occurs BEFORE every action taken by any stack or by the hero
|
//void actionStarted(const BattleAction &action) override;//occurs BEFORE every action taken by any stack or by the hero
|
||||||
//void battleAttack(const BattleAttack *ba) override; //called when stack is performing attack
|
//void battleAttack(const BattleAttack *ba) override; //called when stack is performing attack
|
||||||
|
@ -78,7 +78,7 @@ class CModFilterModel : public QSortFilterProxyModel
|
|||||||
|
|
||||||
bool filterMatchesThis(const QModelIndex & source) const;
|
bool filterMatchesThis(const QModelIndex & source) const;
|
||||||
|
|
||||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
|
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||||
public:
|
public:
|
||||||
void setTypeFilter(int filteredType, int filterMask);
|
void setTypeFilter(int filteredType, int filterMask);
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ class CModListView : public QWidget
|
|||||||
SettingsListener settingsListener;
|
SettingsListener settingsListener;
|
||||||
bool repositoriesChanged;
|
bool repositoriesChanged;
|
||||||
|
|
||||||
void showEvent(QShowEvent * event);
|
void showEvent(QShowEvent * event) override;
|
||||||
|
|
||||||
void keyPressEvent(QKeyEvent * event);
|
void keyPressEvent(QKeyEvent * event) override;
|
||||||
|
|
||||||
void setupModModel();
|
void setupModModel();
|
||||||
void setupFilterModel();
|
void setupFilterModel();
|
||||||
|
@ -19,8 +19,8 @@ public:
|
|||||||
|
|
||||||
static void showPixmap(QPixmap & pixmap, QWidget *parent = 0);
|
static void showPixmap(QPixmap & pixmap, QWidget *parent = 0);
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent * event);
|
void mousePressEvent(QMouseEvent * event) override;
|
||||||
void keyPressEvent(QKeyEvent * event);
|
void keyPressEvent(QKeyEvent * event) override;
|
||||||
QSize calculateWindowSize();
|
QSize calculateWindowSize();
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
template <typename T> class CApplyOnGH : public CBaseForGHApply
|
template <typename T> class CApplyOnGH : public CBaseForGHApply
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool applyOnGH(CGameHandler *gh, CConnection *c, void *pack, PlayerColor player) const
|
bool applyOnGH(CGameHandler *gh, CConnection *c, void *pack, PlayerColor player) const override
|
||||||
{
|
{
|
||||||
T *ptr = static_cast<T*>(pack);
|
T *ptr = static_cast<T*>(pack);
|
||||||
ptr->c = c;
|
ptr->c = c;
|
||||||
@ -106,7 +106,7 @@ template <>
|
|||||||
class CApplyOnGH<CPack> : public CBaseForGHApply
|
class CApplyOnGH<CPack> : public CBaseForGHApply
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool applyOnGH(CGameHandler *gh, CConnection *c, void *pack, PlayerColor player) const
|
bool applyOnGH(CGameHandler *gh, CConnection *c, void *pack, PlayerColor player) const override
|
||||||
{
|
{
|
||||||
logGlobal->error("Cannot apply on GH plain CPack!");
|
logGlobal->error("Cannot apply on GH plain CPack!");
|
||||||
assert(0);
|
assert(0);
|
||||||
|
Reference in New Issue
Block a user