diff --git a/AI/BattleAI/BattleAI.cpp b/AI/BattleAI/BattleAI.cpp index 680e2c11a..bca39ba2b 100644 --- a/AI/BattleAI/BattleAI.cpp +++ b/AI/BattleAI/BattleAI.cpp @@ -16,12 +16,12 @@ #define LOGL(text) print(text) #define LOGFL(text, formattingEl) print(boost::str(boost::format(text) % formattingEl)) -CBattleAI::CBattleAI(void) +CBattleAI::CBattleAI() : side(-1), wasWaitingForRealize(false), wasUnlockingGs(false) { } -CBattleAI::~CBattleAI(void) +CBattleAI::~CBattleAI() { if(cb) { diff --git a/AI/BattleAI/BattleAI.h b/AI/BattleAI/BattleAI.h index c44e0a71c..373eca1fb 100644 --- a/AI/BattleAI/BattleAI.h +++ b/AI/BattleAI/BattleAI.h @@ -61,8 +61,8 @@ class CBattleAI : public CBattleGameInterface bool wasWaitingForRealize, wasUnlockingGs; public: - CBattleAI(void); - ~CBattleAI(void); + CBattleAI(); + ~CBattleAI(); void init(std::shared_ptr CB) override; void attemptCastingSpell(); diff --git a/AI/StupidAI/StupidAI.cpp b/AI/StupidAI/StupidAI.cpp index 8da9b99cf..c61c35cb8 100644 --- a/AI/StupidAI/StupidAI.cpp +++ b/AI/StupidAI/StupidAI.cpp @@ -16,14 +16,14 @@ static std::shared_ptr cbc; -CStupidAI::CStupidAI(void) +CStupidAI::CStupidAI() : side(-1) { print("created"); } -CStupidAI::~CStupidAI(void) +CStupidAI::~CStupidAI() { print("destroyed"); } diff --git a/AI/StupidAI/StupidAI.h b/AI/StupidAI/StupidAI.h index cc5b0f2ba..29d16759e 100644 --- a/AI/StupidAI/StupidAI.h +++ b/AI/StupidAI/StupidAI.h @@ -18,8 +18,8 @@ class CStupidAI : public CBattleGameInterface void print(const std::string &text) const; public: - CStupidAI(void); - ~CStupidAI(void); + CStupidAI(); + ~CStupidAI(); void init(std::shared_ptr CB) override; void actionFinished(const BattleAction &action) override;//occurs AFTER every action taken by any stack or by the hero diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index 76c0b4d13..7ba0b84fa 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -81,7 +81,7 @@ struct ObjInfo std::map helperObjInfo; -VCAI::VCAI(void) +VCAI::VCAI() { LOG_TRACE(logAi); makingTurn = nullptr; @@ -89,7 +89,7 @@ VCAI::VCAI(void) destinationTeleportPos = int3(-1); } -VCAI::~VCAI(void) +VCAI::~VCAI() { LOG_TRACE(logAi); finish(); diff --git a/AI/VCAI/VCAI.h b/AI/VCAI/VCAI.h index 9fdb50a16..396bb31bc 100644 --- a/AI/VCAI/VCAI.h +++ b/AI/VCAI/VCAI.h @@ -165,8 +165,8 @@ public: std::unique_ptr makingTurn; - VCAI(void); - virtual ~VCAI(void); + VCAI(); + virtual ~VCAI(); //TODO: use only smart pointers? void tryRealize(Goals::Explore & g); diff --git a/client/CMT.cpp b/client/CMT.cpp index 1b9b70eb8..a8c4ac299 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -191,7 +191,7 @@ void init() } } -static void prog_version(void) +static void prog_version() { printf("%s\n", GameConstants::VCMI_VERSION.c_str()); std::cout << VCMIDirs::get().genHelpString(); diff --git a/client/CMusicHandler.cpp b/client/CMusicHandler.cpp index 36172c295..d5c516dde 100644 --- a/client/CMusicHandler.cpp +++ b/client/CMusicHandler.cpp @@ -40,7 +40,7 @@ static void soundFinishedCallbackC(int channel) CCS->soundh->soundFinishedCallback(channel); } -static void musicFinishedCallbackC(void) +static void musicFinishedCallbackC() { CCS->musich->musicFinishedCallback(); } @@ -487,7 +487,7 @@ void CMusicHandler::setVolume(ui32 percent) Mix_VolumeMusic((MIX_MAX_VOLUME * volume)/100); } -void CMusicHandler::musicFinishedCallback(void) +void CMusicHandler::musicFinishedCallback() { boost::mutex::scoped_lock guard(mutex); diff --git a/client/CMusicHandler.h b/client/CMusicHandler.h index 75bc8b596..df1ede0a2 100644 --- a/client/CMusicHandler.h +++ b/client/CMusicHandler.h @@ -147,7 +147,7 @@ public: /// play specific track from set void playMusicFromSet(std::string musicSet, int entryID, bool loop); void stopMusic(int fade_ms=1000); - void musicFinishedCallback(void); + void musicFinishedCallback(); friend class MusicEntry; }; diff --git a/client/Client.cpp b/client/Client.cpp index e23b74c8e..23c6e2df4 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -130,7 +130,7 @@ void CClient::init() terminate = false; } -CClient::CClient(void) +CClient::CClient() { init(); } @@ -141,7 +141,7 @@ CClient::CClient(CConnection *con, StartInfo *si) newGame(con,si); } -CClient::~CClient(void) +CClient::~CClient() { delete applier; } diff --git a/client/Client.h b/client/Client.h index d96c732e6..e6473f758 100644 --- a/client/Client.h +++ b/client/Client.h @@ -147,9 +147,9 @@ public: //void sendRequest(const CPackForServer *request, bool waitForRealization); - CClient(void); + CClient(); CClient(CConnection *con, StartInfo *si); - ~CClient(void); + ~CClient(); void init(); void newGame(CConnection *con, StartInfo *si); //con - connection to server diff --git a/lib/CConfigHandler.cpp b/lib/CConfigHandler.cpp index 85220e3ea..d6d95ee3a 100644 --- a/lib/CConfigHandler.cpp +++ b/lib/CConfigHandler.cpp @@ -200,11 +200,12 @@ static void setGem(AdventureMapConfig &ac, const int gem, const JsonNode &g) ac.gemG.push_back(g["graphic"].String()); } -CConfigHandler::CConfigHandler(void): current(nullptr) +CConfigHandler::CConfigHandler() + : current(nullptr) { } -CConfigHandler::~CConfigHandler(void) +CConfigHandler::~CConfigHandler() { } diff --git a/lib/CConfigHandler.h b/lib/CConfigHandler.h index 35d25aae7..512398648 100644 --- a/lib/CConfigHandler.h +++ b/lib/CConfigHandler.h @@ -169,8 +169,8 @@ namespace config typedef std::map, GUIOptions > GuiOptionsMap; GuiOptionsMap guiOptions; void init(); - CConfigHandler(void); - ~CConfigHandler(void); + CConfigHandler(); + ~CConfigHandler(); GUIOptions *go() { return current; }; void SetResolution(int x, int y) diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp index 73dd2c543..d4dfcbe50 100644 --- a/lib/serializer/Connection.cpp +++ b/lib/serializer/Connection.cpp @@ -163,7 +163,7 @@ int CConnection::read(void * data, unsigned size) throw; } } -CConnection::~CConnection(void) +CConnection::~CConnection() { if(handler) handler->join(); diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h index 68adf8e3a..aab96f4b2 100644 --- a/lib/serializer/Connection.h +++ b/lib/serializer/Connection.h @@ -43,7 +43,7 @@ typedef boost::asio::basic_socket_acceptor CConnection &operator&(const T&); - virtual ~CConnection(void); + virtual ~CConnection(); CPack *retreivePack(); //gets from server next pack (allocates it with new) void sendPackToServer(const CPack &pack, PlayerColor player, ui32 requestID); diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index d49966369..10c58a23f 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1388,7 +1388,7 @@ int CGameHandler::moveStack(int stack, BattleHex dest) return ret; } -CGameHandler::CGameHandler(void) +CGameHandler::CGameHandler() { QID = 1; //gs = nullptr; @@ -1400,7 +1400,7 @@ CGameHandler::CGameHandler(void) spellEnv = new ServerSpellCastEnvironment(this); } -CGameHandler::~CGameHandler(void) +CGameHandler::~CGameHandler() { delete spellEnv; delete applier; diff --git a/server/CGameHandler.h b/server/CGameHandler.h index 6698f5a0a..bfb4f5a41 100644 --- a/server/CGameHandler.h +++ b/server/CGameHandler.h @@ -108,8 +108,8 @@ public: void setupBattle(int3 tile, const CArmedInstance *armies[2], const CGHeroInstance *heroes[2], bool creatureBank, const CGTownInstance *town); void setBattleResult(BattleResult::EResult resultType, int victoriusSide); - CGameHandler(void); - ~CGameHandler(void); + CGameHandler(); + ~CGameHandler(); ////////////////////////////////////////////////////////////////////////// //from IGameCallback diff --git a/server/CQuery.cpp b/server/CQuery.cpp index 7106efd8d..b0d4e3404 100644 --- a/server/CQuery.cpp +++ b/server/CQuery.cpp @@ -55,7 +55,7 @@ CQuery::CQuery(Queries * Owner): } -CQuery::~CQuery(void) +CQuery::~CQuery() { logGlobal->trace("Destructed the query with id %d", queryID); } diff --git a/server/CQuery.h b/server/CQuery.h index 7f68e2798..c63d6b6c5 100644 --- a/server/CQuery.h +++ b/server/CQuery.h @@ -54,7 +54,7 @@ public: virtual void setReply(const JsonNode & reply); - virtual ~CQuery(void); + virtual ~CQuery(); protected: Queries * owner; void addPlayer(PlayerColor color);