1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00

Enabled & fixed -Woverloaded-virtual warning from gcc/cland

- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
This commit is contained in:
Ivan Savenko
2022-12-07 21:50:45 +02:00
parent 65802d958b
commit 2855606a88
34 changed files with 120 additions and 88 deletions

View File

@@ -52,7 +52,6 @@ struct StackLocation;
class CStackInstance;
class CCommanderInstance;
class CStack;
struct CPathsInfo;
class CCreature;
class CLoadFile;
class CSaveFile;
@@ -78,7 +77,7 @@ public:
std::string dllName;
virtual ~CBattleGameInterface() {};
virtual void init(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB){};
virtual void initBattleInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB){};
//battle call-ins
virtual BattleAction activeStack(const CStack * stack)=0; //called when it's turn of that stack
@@ -90,7 +89,7 @@ class DLL_LINKAGE CGameInterface : public CBattleGameInterface, public IGameEven
{
public:
virtual ~CGameInterface() = default;
virtual void init(std::shared_ptr<Environment> ENV, std::shared_ptr<CCallback> CB){};
virtual void initGameInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CCallback> CB){};
virtual void yourTurn(){}; //called AFTER playerStartsTurn(player)
//pskill is gained primary skill, interface has to choose one of given skills and call callback with selection id