diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-17 23:06:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-17 23:06:56 +0300 |
commit | dba0611175c8d4a56dfbc918ccef139351e5c3e0 (patch) | |
tree | b3c7a5684604facc0f0f5656fe373958c53dc5ad /src/gui/models | |
parent | 53530f76275df76406a9ce438a33df78c50d0948 (diff) | |
download | mv-dba0611175c8d4a56dfbc918ccef139351e5c3e0.tar.gz mv-dba0611175c8d4a56dfbc918ccef139351e5c3e0.tar.bz2 mv-dba0611175c8d4a56dfbc918ccef139351e5c3e0.tar.xz mv-dba0611175c8d4a56dfbc918ccef139351e5c3e0.zip |
Revert "Remove override keyword, if it present with final."
This reverts commit 55480eb4477b2cf85af1bcdcc5e8ec4f4ce6682d.
Diffstat (limited to 'src/gui/models')
28 files changed, 63 insertions, 63 deletions
diff --git a/src/gui/models/avatarlistmodel.h b/src/gui/models/avatarlistmodel.h index cea5aa1ee..2083d6314 100644 --- a/src/gui/models/avatarlistmodel.h +++ b/src/gui/models/avatarlistmodel.h @@ -31,7 +31,7 @@ class AvatarListModel notfinal : public ListModel public: virtual Avatar *getAvatarAt(const int i) A_WARN_UNUSED = 0; - std::string getElementAt(int i) final A_WARN_UNUSED + std::string getElementAt(int i) override final A_WARN_UNUSED { return getAvatarAt(i)->getName(); } }; diff --git a/src/gui/models/beingslistmodel.h b/src/gui/models/beingslistmodel.h index 4476dca05..ccf0338c7 100644 --- a/src/gui/models/beingslistmodel.h +++ b/src/gui/models/beingslistmodel.h @@ -48,12 +48,12 @@ class BeingsListModel final : public AvatarListModel return &mMembers; } - Avatar *getAvatarAt(int index) final + Avatar *getAvatarAt(int index) override final { return mMembers[index]; } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mMembers.size()); } diff --git a/src/gui/models/colorlistmodel.h b/src/gui/models/colorlistmodel.h index 1f4bf2e83..49dbffce5 100644 --- a/src/gui/models/colorlistmodel.h +++ b/src/gui/models/colorlistmodel.h @@ -65,12 +65,12 @@ class ColorListModel final : public ListModel ~ColorListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 14; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/colormodel.h b/src/gui/models/colormodel.h index 96c4b1021..1e08dd9cd 100644 --- a/src/gui/models/colormodel.h +++ b/src/gui/models/colormodel.h @@ -41,9 +41,9 @@ class ColorModel final : public ListModel virtual ~ColorModel(); - int getNumberOfElements() final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - std::string getElementAt(int i) final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; const ColorPair *getColorAt(const int i) const RETURNS_NONNULL A_WARN_UNUSED; diff --git a/src/gui/models/extendednamesmodel.h b/src/gui/models/extendednamesmodel.h index f4f2670e1..e14032cc4 100644 --- a/src/gui/models/extendednamesmodel.h +++ b/src/gui/models/extendednamesmodel.h @@ -34,11 +34,11 @@ class ExtendedNamesModel notfinal : public ExtendedListModel virtual ~ExtendedNamesModel(); - int getNumberOfElements() final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - std::string getElementAt(int i) final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; - const Image *getImageAt(int i) final A_WARN_UNUSED; + const Image *getImageAt(int i) override final A_WARN_UNUSED; StringVect &getNames() A_WARN_UNUSED { return mNames; } diff --git a/src/gui/models/fontsizechoicelistmodel.h b/src/gui/models/fontsizechoicelistmodel.h index 16b2a65ab..9496348c3 100644 --- a/src/gui/models/fontsizechoicelistmodel.h +++ b/src/gui/models/fontsizechoicelistmodel.h @@ -71,10 +71,10 @@ class FontSizeChoiceListModel final : public ListModel ~FontSizeChoiceListModel() { } - int getNumberOfElements() final A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { return maxFontSizes; } - std::string getElementAt(int i) final A_WARN_UNUSED + std::string getElementAt(int i) override final A_WARN_UNUSED { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/iconsmodel.h b/src/gui/models/iconsmodel.h index 1c8c25ae4..a04703149 100644 --- a/src/gui/models/iconsmodel.h +++ b/src/gui/models/iconsmodel.h @@ -68,12 +68,12 @@ class IconsModel final : public ListModel ~IconsModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mStrings.size()); } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i < 0 || i >= getNumberOfElements()) return "???"; diff --git a/src/gui/models/ignorechoiceslistmodel.h b/src/gui/models/ignorechoiceslistmodel.h index b25c6874a..8a8a7f053 100644 --- a/src/gui/models/ignorechoiceslistmodel.h +++ b/src/gui/models/ignorechoiceslistmodel.h @@ -37,13 +37,13 @@ class IgnoreChoicesListModel final : public ListModel ~IgnoreChoicesListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(player_relations. getPlayerIgnoreStrategies()->size()); } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/itemsmodel.h b/src/gui/models/itemsmodel.h index 8fea34167..032a090eb 100644 --- a/src/gui/models/itemsmodel.h +++ b/src/gui/models/itemsmodel.h @@ -67,12 +67,12 @@ class ItemsModal final : public ListModel ~ItemsModal() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mStrings.size()); } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i < 0 || i >= getNumberOfElements()) return "???"; diff --git a/src/gui/models/keylistmodel.h b/src/gui/models/keylistmodel.h index d9f04a634..101307f30 100644 --- a/src/gui/models/keylistmodel.h +++ b/src/gui/models/keylistmodel.h @@ -52,13 +52,13 @@ class KeyListModel final : public ListModel /** * Returns the number of elements in container. */ - int getNumberOfElements() final + int getNumberOfElements() override final { return mSize; } /** * Returns element from container. */ - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { return setupActionData[mSelectedData][i].text; } /** diff --git a/src/gui/models/langlistmodel.h b/src/gui/models/langlistmodel.h index b3eacb550..1adfb3e91 100644 --- a/src/gui/models/langlistmodel.h +++ b/src/gui/models/langlistmodel.h @@ -109,10 +109,10 @@ class LangListModel final : public ExtendedListModel } } - int getNumberOfElements() final A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { return langs_count; } - std::string getElementAt(int i) final A_WARN_UNUSED + std::string getElementAt(int i) override final A_WARN_UNUSED { if (i >= getNumberOfElements() || i < 0) return "???"; @@ -120,7 +120,7 @@ class LangListModel final : public ExtendedListModel return gettext(LANG_NAME[i].name.c_str()); } - const Image *getImageAt(int i) final A_WARN_UNUSED + const Image *getImageAt(int i) override final A_WARN_UNUSED { if (i >= getNumberOfElements() || i < 0) return nullptr; diff --git a/src/gui/models/magicschoolmodel.h b/src/gui/models/magicschoolmodel.h index 91d87c337..4c4028312 100644 --- a/src/gui/models/magicschoolmodel.h +++ b/src/gui/models/magicschoolmodel.h @@ -51,12 +51,12 @@ class MagicSchoolModel final : public ListModel ~MagicSchoolModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 6; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/modelistmodel.h b/src/gui/models/modelistmodel.h index 2efa322d4..9e5339a3d 100644 --- a/src/gui/models/modelistmodel.h +++ b/src/gui/models/modelistmodel.h @@ -42,13 +42,13 @@ class ModeListModel final : public ListModel /** * Returns the number of elements in container. */ - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mVideoModes.size()); } /** * Returns element from container. */ - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { return mVideoModes[CAST_SIZE(i)]; } /** diff --git a/src/gui/models/namesmodel.h b/src/gui/models/namesmodel.h index ddf523ddd..63af17db6 100644 --- a/src/gui/models/namesmodel.h +++ b/src/gui/models/namesmodel.h @@ -36,9 +36,9 @@ class NamesModel notfinal : public ListModel virtual ~NamesModel(); - int getNumberOfElements() final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - std::string getElementAt(int i) final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; StringVect &getNames() A_WARN_UNUSED { return mNames; } diff --git a/src/gui/models/opengllistmodel.h b/src/gui/models/opengllistmodel.h index cc040cb80..275da2f31 100644 --- a/src/gui/models/opengllistmodel.h +++ b/src/gui/models/opengllistmodel.h @@ -33,10 +33,10 @@ class OpenGLListModel final : public ListModel ~OpenGLListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return renderModesListSize; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/playerrelationlistmodel.h b/src/gui/models/playerrelationlistmodel.h index 3fedec8bc..b23cea0f8 100644 --- a/src/gui/models/playerrelationlistmodel.h +++ b/src/gui/models/playerrelationlistmodel.h @@ -53,12 +53,12 @@ class PlayerRelationListModel final : public ListModel ~PlayerRelationListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return PlayerRelation::RELATIONS_NR; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return ""; diff --git a/src/gui/models/playertablemodel.h b/src/gui/models/playertablemodel.h index 297b34ba6..4aa4430a3 100644 --- a/src/gui/models/playertablemodel.h +++ b/src/gui/models/playertablemodel.h @@ -41,19 +41,19 @@ class PlayerTableModel final : public Widget2, ~PlayerTableModel(); - int getRows() const final; + int getRows() const override final; - int getColumns() const final A_CONST; + int getColumns() const override final A_CONST; - int getRowHeight() const final A_CONST; + int getRowHeight() const override final A_CONST; - int getColumnWidth(const int index) const final A_CONST; + int getColumnWidth(const int index) const override final A_CONST; void playerRelationsUpdated(); void updateModelInRow(const int row) const; - Widget *getElementAt(int row, int column) const final; + Widget *getElementAt(int row, int column) const override final; void freeWidgets(); diff --git a/src/gui/models/serverslistmodel.h b/src/gui/models/serverslistmodel.h index 8b259f04c..15d3d7e9a 100644 --- a/src/gui/models/serverslistmodel.h +++ b/src/gui/models/serverslistmodel.h @@ -53,7 +53,7 @@ class ServersListModel final : public ListModel /** * Used to get number of line in the list */ - int getNumberOfElements() final A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { MutexLocker lock = mParent->lock(); return CAST_S32(mServers->size()); @@ -63,7 +63,7 @@ class ServersListModel final : public ListModel * Used to get an element from the list */ std::string getElementAt(int elementIndex) - final A_WARN_UNUSED + override final A_WARN_UNUSED { MutexLocker lock = mParent->lock(); const ServerInfo &server = mServers->at(elementIndex); diff --git a/src/gui/models/shopitems.h b/src/gui/models/shopitems.h index ddba1d1b0..0aedce83f 100644 --- a/src/gui/models/shopitems.h +++ b/src/gui/models/shopitems.h @@ -93,7 +93,7 @@ class ShopItems final : public ListModel /** * Returns the number of items in the shop. */ - int getNumberOfElements() final A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { return CAST_S32(mShopItems.size()); } bool empty() const A_WARN_UNUSED @@ -104,7 +104,7 @@ class ShopItems final : public ListModel * * @param i the index to retrieve */ - std::string getElementAt(int i) final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; /** * Returns the item number i in the shop. diff --git a/src/gui/models/skillmodel.h b/src/gui/models/skillmodel.h index a7b796dd4..d7695253d 100644 --- a/src/gui/models/skillmodel.h +++ b/src/gui/models/skillmodel.h @@ -35,9 +35,9 @@ class SkillModel final : public ListModel SkillInfo *getSkillAt(const int i) const; - std::string getElementAt(int i) final; + std::string getElementAt(int i) override final; - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mVisibleSkills.size()); } void addSkill(SkillInfo *const info) diff --git a/src/gui/models/sortlistmodelbuy.h b/src/gui/models/sortlistmodelbuy.h index 586246645..ec42f9fdd 100644 --- a/src/gui/models/sortlistmodelbuy.h +++ b/src/gui/models/sortlistmodelbuy.h @@ -51,10 +51,10 @@ class SortListModelBuy final : public ListModel ~SortListModelBuy() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 7; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/sortlistmodelinv.h b/src/gui/models/sortlistmodelinv.h index 103ffb26c..09dbbc53e 100644 --- a/src/gui/models/sortlistmodelinv.h +++ b/src/gui/models/sortlistmodelinv.h @@ -48,10 +48,10 @@ class SortListModelInv final : public ListModel ~SortListModelInv() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 6; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/tablemodel.h b/src/gui/models/tablemodel.h index 14a186004..052718d40 100644 --- a/src/gui/models/tablemodel.h +++ b/src/gui/models/tablemodel.h @@ -129,14 +129,14 @@ class StaticTableModel final : public TableModel */ void resize(); - int getRows() const final A_WARN_UNUSED; - int getColumns() const final A_WARN_UNUSED; - int getRowHeight() const final A_WARN_UNUSED; + int getRows() const override final A_WARN_UNUSED; + int getColumns() const override final A_WARN_UNUSED; + int getRowHeight() const override final A_WARN_UNUSED; int getWidth() const A_WARN_UNUSED; int getHeight() const A_WARN_UNUSED; - int getColumnWidth(const int index) const final A_WARN_UNUSED; + int getColumnWidth(const int index) const override final A_WARN_UNUSED; Widget *getElementAt(const int row, - const int column) const final + const int column) const override final A_WARN_UNUSED; protected: diff --git a/src/gui/models/targettypemodel.h b/src/gui/models/targettypemodel.h index 416ba5a41..ad61e3c0b 100644 --- a/src/gui/models/targettypemodel.h +++ b/src/gui/models/targettypemodel.h @@ -42,12 +42,12 @@ class TargetTypeModel final : public ListModel ~TargetTypeModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 3; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/typelistmodel.h b/src/gui/models/typelistmodel.h index b58d91bb5..04d9d93de 100644 --- a/src/gui/models/typelistmodel.h +++ b/src/gui/models/typelistmodel.h @@ -36,7 +36,7 @@ class TypeListModel final : public ListModel /** * Used to get number of line in the list */ - int getNumberOfElements() final A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED #if defined(EATHENA_SUPPORT) && defined(TMWA_SUPPORT) { return 3; } #elif defined(EATHENA_SUPPORT) @@ -49,7 +49,7 @@ class TypeListModel final : public ListModel * Used to get an element from the list */ std::string getElementAt(int elementIndex) - final A_WARN_UNUSED + override final A_WARN_UNUSED { #ifdef TMWA_SUPPORT if (elementIndex == 0) diff --git a/src/gui/models/updatelistmodel.h b/src/gui/models/updatelistmodel.h index 37d5a8d12..e2424cb7b 100644 --- a/src/gui/models/updatelistmodel.h +++ b/src/gui/models/updatelistmodel.h @@ -53,12 +53,12 @@ class UpdateListModel final : public ListModel ~UpdateListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mNames.size()); } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/updatetypemodel.h b/src/gui/models/updatetypemodel.h index 12a0a1e27..abdcc1625 100644 --- a/src/gui/models/updatetypemodel.h +++ b/src/gui/models/updatetypemodel.h @@ -47,12 +47,12 @@ class UpdateTypeModel final : public ListModel ~UpdateTypeModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return 3; } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/worldlistmodel.h b/src/gui/models/worldlistmodel.h index 4489cf95e..035824cb4 100644 --- a/src/gui/models/worldlistmodel.h +++ b/src/gui/models/worldlistmodel.h @@ -45,12 +45,12 @@ class WorldListModel final : public ListModel ~WorldListModel() { } - int getNumberOfElements() final + int getNumberOfElements() override final { return CAST_S32(mWorlds.size()); } - std::string getElementAt(int i) final + std::string getElementAt(int i) override final { const WorldInfo *const si = mWorlds[i]; if (si) |