diff --git a/client/CDefHandler.h b/client/CDefHandler.h index d33efe92c..31bdf5f59 100644 --- a/client/CDefHandler.h +++ b/client/CDefHandler.h @@ -70,7 +70,7 @@ class CDefEssential //DefHandler with images only { public: std::vector ourImages; - ~CDefEssential(); //d-tor + ~CDefEssential(); }; class CDefHandler @@ -93,8 +93,8 @@ public: std::vector ourImages; bool notFreeImgs; - CDefHandler(); //c-tor - ~CDefHandler(); //d-tor + CDefHandler(); + ~CDefHandler(); CDefEssential * essentialize(); diff --git a/client/CMessage.cpp b/client/CMessage.cpp index eb29a32fa..8ad5693d9 100644 --- a/client/CMessage.cpp +++ b/client/CMessage.cpp @@ -44,9 +44,9 @@ public: //blit component with image centered at this position void showAll(SDL_Surface * to) override; - //ComponentResolved(); //c-tor - ComponentResolved(CComponent *Comp); //c-tor - ~ComponentResolved(); //d-tor + //ComponentResolved(); + ComponentResolved(CComponent *Comp); + ~ComponentResolved(); }; // Full set of components for blitting on dialog box struct ComponentsToBlit @@ -55,8 +55,8 @@ struct ComponentsToBlit int w, h; void blitCompsOnSur(bool blitOr, int inter, int &curh, SDL_Surface *ret); - ComponentsToBlit(std::vector & SComps, int maxw, bool blitOr); //c-tor - ~ComponentsToBlit(); //d-tor + ComponentsToBlit(std::vector & SComps, int maxw, bool blitOr); + ~ComponentsToBlit(); }; namespace diff --git a/client/CPlayerInterface.h b/client/CPlayerInterface.h index 9591bd2a3..1c3c60651 100644 --- a/client/CPlayerInterface.h +++ b/client/CPlayerInterface.h @@ -263,8 +263,8 @@ public: ///returns true if all events are processed internally bool capturedAllEvents(); - CPlayerInterface(PlayerColor Player);//c-tor - ~CPlayerInterface();//d-tor + CPlayerInterface(PlayerColor Player); + ~CPlayerInterface(); private: diff --git a/client/CPreGame.cpp b/client/CPreGame.cpp index 3c48a5640..5c4d870b9 100644 --- a/client/CPreGame.cpp +++ b/client/CPreGame.cpp @@ -1325,7 +1325,7 @@ SelectionTab::SelectionTab(CMenuScreen::EState Type, const std::function att, std::shared_ptr defen, std::shared_ptr spectatorInt = nullptr); //c-tor - virtual ~CBattleInterface(); //d-tor + CBattleInterface(const CCreatureSet *army1, const CCreatureSet *army2, const CGHeroInstance *hero1, const CGHeroInstance *hero2, const SDL_Rect & myRect, std::shared_ptr att, std::shared_ptr defen, std::shared_ptr spectatorInt = nullptr); + virtual ~CBattleInterface(); //std::vector timeinterested; //animation handling void setPrintCellBorders(bool set); //if true, cell borders will be printed diff --git a/client/battle/CBattleInterfaceClasses.h b/client/battle/CBattleInterfaceClasses.h index dc785a54b..589dafc43 100644 --- a/client/battle/CBattleInterfaceClasses.h +++ b/client/battle/CBattleInterfaceClasses.h @@ -65,8 +65,8 @@ public: void hover(bool on) override; void clickLeft(tribool down, bool previousState) override; //call-in void clickRight(tribool down, bool previousState) override; //call-in - CBattleHero(const std::string &defName, bool filpG, PlayerColor player, const CGHeroInstance *hero, const CBattleInterface *owner); //c-tor - ~CBattleHero(); //d-tor + CBattleHero(const std::string &defName, bool filpG, PlayerColor player, const CGHeroInstance *hero, const CBattleInterface *owner); + ~CBattleHero(); }; class CHeroInfoWindow : public CWindowObject @@ -86,7 +86,7 @@ private: std::vector labels; public: - CBattleOptionsWindow(const SDL_Rect &position, CBattleInterface *owner); //c-tor + CBattleOptionsWindow(const SDL_Rect &position, CBattleInterface *owner); void bDefaultf(); //default button callback void bExitf(); //exit button callback @@ -99,8 +99,8 @@ private: CButton *exit; CPlayerInterface &owner; public: - CBattleResultWindow(const BattleResult & br, const SDL_Rect & pos, CPlayerInterface &_owner); //c-tor - ~CBattleResultWindow(); //d-tor + CBattleResultWindow(const BattleResult & br, const SDL_Rect & pos, CPlayerInterface &_owner); + ~CBattleResultWindow(); void bExitf(); //exit button callback diff --git a/client/battle/CCreatureAnimation.h b/client/battle/CCreatureAnimation.h index 81b5d0be5..53386b55e 100644 --- a/client/battle/CCreatureAnimation.h +++ b/client/battle/CCreatureAnimation.h @@ -113,7 +113,7 @@ public: /// name - path to .def file, relative to SPRITES/ directory /// controller - function that will return for how long *each* frame /// in specified group of animation should be played, measured in seconds - CCreatureAnimation(std::string name, TSpeedController speedController); //c-tor + CCreatureAnimation(std::string name, TSpeedController speedController); void setType(CCreatureAnim::EAnimType type); //sets type of animation and cleares framecount CCreatureAnim::EAnimType getType() const; //returns type of animation diff --git a/client/gui/CIntObject.h b/client/gui/CIntObject.h index 0dc943844..b2f04df75 100644 --- a/client/gui/CIntObject.h +++ b/client/gui/CIntObject.h @@ -27,14 +27,14 @@ class IActivatable public: virtual void activate()=0; virtual void deactivate()=0; - virtual ~IActivatable(){}; //d-tor + virtual ~IActivatable(){}; }; class IUpdateable { public: virtual void update()=0; - virtual ~IUpdateable(){}; //d-tor + virtual ~IUpdateable(){}; }; // Defines a show method @@ -47,7 +47,7 @@ public: { show(to); } - virtual ~IShowable(){}; //d-tor + virtual ~IShowable(){}; }; class IShowActivatable : public IShowable, public IActivatable @@ -57,7 +57,7 @@ public: enum {BLOCK_ADV_HOTKEYS = 2, REDRAW_PARENT=8}; int type; //bin flags using etype IShowActivatable(); - virtual ~IShowActivatable(){}; //d-tor + virtual ~IShowActivatable(){}; }; enum class EIntObjMouseBtnType { LEFT, MIDDLE, RIGHT }; @@ -104,7 +104,7 @@ public: /*const*/ Rect pos; CIntObject(int used=0, Point offset=Point()); - virtual ~CIntObject(); //d-tor + virtual ~CIntObject(); void updateMouseState(EIntObjMouseBtnType btn, bool state) { currentMouseState[btn] = state; } bool mouseState(EIntObjMouseBtnType btn) const { return currentMouseState.count(btn) ? currentMouseState.at(btn) : false; } diff --git a/client/gui/Geometries.h b/client/gui/Geometries.h index eeba77e07..2b7ff848c 100644 --- a/client/gui/Geometries.h +++ b/client/gui/Geometries.h @@ -98,21 +98,21 @@ struct Rect : public SDL_Rect { x = y = w = h = -1; } - Rect(int X, int Y, int W, int H) //c-tor + Rect(int X, int Y, int W, int H) { x = X; y = Y; w = W; h = H; } - Rect(const Point & position, const Point & size) //c-tor + Rect(const Point & position, const Point & size) { x = position.x; y = position.y; w = size.x; h = size.y; } - Rect(const SDL_Rect & r) //c-tor + Rect(const SDL_Rect & r) { x = r.x; y = r.y; diff --git a/client/mapHandler.h b/client/mapHandler.h index f979c1e86..54dcff4d6 100644 --- a/client/mapHandler.h +++ b/client/mapHandler.h @@ -370,8 +370,8 @@ public: mutable std::map animationPhase; - CMapHandler(); //c-tor - ~CMapHandler(); //d-tor + CMapHandler(); + ~CMapHandler(); void getTerrainDescr(const int3 &pos, std::string & out, bool terName); //if tername == false => empty string when tile is clear bool printObject(const CGObjectInstance * obj, bool fadein = false); //puts appropriate things to tiles, so obj will be visible on map diff --git a/client/widgets/AdventureMapClasses.h b/client/widgets/AdventureMapClasses.h index 9ebe4f243..8daf2faa8 100644 --- a/client/widgets/AdventureMapClasses.h +++ b/client/widgets/AdventureMapClasses.h @@ -378,5 +378,5 @@ public: void endEnteringText(bool printEnteredText); void refreshEnteredText(); - CInGameConsole(); //c-tor + CInGameConsole(); }; diff --git a/client/widgets/CArtifactHolder.h b/client/widgets/CArtifactHolder.h index 23d47ccbc..4ecea572f 100644 --- a/client/widgets/CArtifactHolder.h +++ b/client/widgets/CArtifactHolder.h @@ -48,7 +48,7 @@ protected: public: const CArtifactInstance * ourArt; // should be changed only with setArtifact() - CArtPlace(Point position, const CArtifactInstance * Art = nullptr); //c-tor + CArtPlace(Point position, const CArtifactInstance * Art = nullptr); void clickLeft(tribool down, bool previousState) override; void clickRight(tribool down, bool previousState) override; @@ -64,7 +64,7 @@ protected: void createImage() override; void returnArtToHeroCallback(); public: - CCommanderArtPlace(Point position, const CGHeroInstance * commanderOwner, ArtifactPosition artSlot, const CArtifactInstance * Art = nullptr); //c-tor + CCommanderArtPlace(Point position, const CGHeroInstance * commanderOwner, ArtifactPosition artSlot, const CArtifactInstance * Art = nullptr); void clickLeft(tribool down, bool previousState) override; void clickRight(tribool down, bool previousState) override; @@ -89,7 +89,7 @@ public: CArtifactsOfHero * ourOwner; - CHeroArtPlace(Point position, const CArtifactInstance * Art = nullptr); //c-tor + CHeroArtPlace(Point position, const CArtifactInstance * Art = nullptr); void lockSlot(bool on); void pickSlot(bool on); @@ -173,7 +173,7 @@ public: //Alternative constructor, used if custom artifacts positioning required (Kingdom interface) CArtifactsOfHero(std::map ArtWorn, std::vector Backpack, CButton *leftScroll, CButton *rightScroll, bool createCommonPart = false); - ~CArtifactsOfHero(); //d-tor + ~CArtifactsOfHero(); void updateParentWindow(); friend class CHeroArtPlace; }; diff --git a/client/widgets/CComponent.h b/client/widgets/CComponent.h index 7bb24dac4..1b7968855 100644 --- a/client/widgets/CComponent.h +++ b/client/widgets/CComponent.h @@ -53,8 +53,8 @@ public: std::string getDescription(); std::string getSubtitle(); - CComponent(Etype Type, int Subtype, int Val = 0, ESize imageSize=large);//c-tor - CComponent(const Component &c, ESize imageSize=large); //c-tor + CComponent(Etype Type, int Subtype, int Val = 0, ESize imageSize=large); + CComponent(const Component &c, ESize imageSize=large); void clickRight(tribool down, bool previousState) override; //call-in }; @@ -71,8 +71,8 @@ public: void select(bool on); void clickLeft(tribool down, bool previousState) override; //call-in - CSelectableComponent(Etype Type, int Sub, int Val, ESize imageSize=large, std::function OnSelect = nullptr); //c-tor - CSelectableComponent(const Component &c, std::function OnSelect = nullptr); //c-tor + CSelectableComponent(Etype Type, int Sub, int Val, ESize imageSize=large, std::function OnSelect = nullptr); + CSelectableComponent(const Component &c, std::function OnSelect = nullptr); }; /// box with multiple components (up to 8?) diff --git a/client/widgets/CGarrisonInt.h b/client/widgets/CGarrisonInt.h index 5bf3970db..84f59f206 100644 --- a/client/widgets/CGarrisonInt.h +++ b/client/widgets/CGarrisonInt.h @@ -135,5 +135,5 @@ class CGarrisonWindow : public CWindowObject, public CWindowWithGarrison public: CButton * quit; - CGarrisonWindow(const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits); //c-tor + CGarrisonWindow(const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits); }; diff --git a/client/widgets/Images.h b/client/widgets/Images.h index d0fe57e22..dda13fdc6 100644 --- a/client/widgets/Images.h +++ b/client/widgets/Images.h @@ -83,7 +83,7 @@ public: CAnimImage(const std::string & name, size_t Frame, size_t Group=0, int x=0, int y=0, ui8 Flags=0); CAnimImage(std::shared_ptr Anim, size_t Frame, size_t Group=0, int x=0, int y=0, ui8 Flags=0); - ~CAnimImage();//d-tor + ~CAnimImage(); //size of animation size_t size(); diff --git a/client/widgets/MiscWidgets.h b/client/widgets/MiscWidgets.h index 12b82b6d9..1be3a8e5e 100644 --- a/client/widgets/MiscWidgets.h +++ b/client/widgets/MiscWidgets.h @@ -89,7 +89,7 @@ private: void show(SDL_Surface *to) override; public: - CCreaturePic(int x, int y, const CCreature *cre, bool Big=true, bool Animated=true); //c-tor + CCreaturePic(int x, int y, const CCreature *cre, bool Big=true, bool Animated=true); void setAmount(int newAmount); }; @@ -101,8 +101,8 @@ public: SDL_Surface *bg; //background bitmap void show(SDL_Surface * to) override; void showAll(SDL_Surface * to) override; - CMinorResDataBar(); //c-tor - ~CMinorResDataBar(); //d-tor + CMinorResDataBar(); + ~CMinorResDataBar(); }; /// Opens hero window by left-clicking on it diff --git a/client/windows/CCastleInterface.h b/client/windows/CCastleInterface.h index 045546b04..3146eaf83 100644 --- a/client/windows/CCastleInterface.h +++ b/client/windows/CCastleInterface.h @@ -46,8 +46,8 @@ public: ui32 stateCounter;//For building construction - current stage in animation - CBuildingRect(CCastleBuildings * Par, const CGTownInstance *Town, const CStructure *Str); //c-tor - ~CBuildingRect(); //d-tor + CBuildingRect(CCastleBuildings * Par, const CGTownInstance *Town, const CStructure *Str); + ~CBuildingRect(); bool operator<(const CBuildingRect & p2) const; void hover(bool on) override; void clickLeft(tribool down, bool previousState) override; @@ -90,8 +90,8 @@ public: void clickLeft(tribool down, bool previousState) override; void clickRight(tribool down, bool previousState) override; void deactivate() override; - CHeroGSlot(int x, int y, int updown, const CGHeroInstance *h, HeroSlots * Owner); //c-tor - ~CHeroGSlot(); //d-tor + CHeroGSlot(int x, int y, int updown, const CGHeroInstance *h, HeroSlots * Owner); + ~CHeroGSlot(); }; /// Two hero slots that can interact with each other @@ -216,7 +216,7 @@ public: CCastleBuildings *builds; //from - previously selected castle (if any) - CCastleInterface(const CGTownInstance * Town, const CGTownInstance * from = nullptr); //c-tor + CCastleInterface(const CGTownInstance * Town, const CGTownInstance * from = nullptr); ~CCastleInterface(); void castleTeleport(int where); @@ -253,7 +253,7 @@ class CHallInterface : public CWindowObject CButton *exit; public: - CHallInterface(const CGTownInstance * Town); //c-tor + CHallInterface(const CGTownInstance * Town); }; /// Window where you can decide to buy a building or not @@ -265,7 +265,7 @@ class CBuildWindow: public CWindowObject std::string getTextForState(int state); void buyFunc(); public: - CBuildWindow(const CGTownInstance *Town, const CBuilding * building, int State, bool rightClick); //c-tor + CBuildWindow(const CGTownInstance *Town, const CBuilding * building, int State, bool rightClick); }; //Small class to display @@ -315,7 +315,7 @@ class CFortScreen : public CWindowObject std::string getBgName(const CGTownInstance *town); public: - CFortScreen(const CGTownInstance * town); //c-tor + CFortScreen(const CGTownInstance * town); void creaturesChanged(); }; diff --git a/client/windows/CHeroWindow.h b/client/windows/CHeroWindow.h index 98fcb0f1c..efb0b0a6f 100644 --- a/client/windows/CHeroWindow.h +++ b/client/windows/CHeroWindow.h @@ -80,7 +80,7 @@ class CHeroWindow: public CWindowObject, public CWindowWithGarrison, public CWin public: const CGHeroInstance * curHero; - CHeroWindow(const CGHeroInstance *hero); //c-tor + CHeroWindow(const CGHeroInstance *hero); void update(const CGHeroInstance * hero, bool redrawNeeded = false); //sets main displayed hero void showAll(SDL_Surface * to) override; diff --git a/client/windows/CSpellWindow.h b/client/windows/CSpellWindow.h index d71703150..273e0ea63 100644 --- a/client/windows/CSpellWindow.h +++ b/client/windows/CSpellWindow.h @@ -59,7 +59,7 @@ class CSpellWindow : public CWindowObject void clickRight(tribool down, bool previousState) override; void hover(bool on) override; - InteractiveArea(const SDL_Rect & myRect, std::function funcL, int helpTextId, CSpellWindow * _owner);//c-tor + InteractiveArea(const SDL_Rect & myRect, std::function funcL, int helpTextId, CSpellWindow * _owner); }; CPicture * leftCorner, * rightCorner; @@ -92,8 +92,8 @@ class CSpellWindow : public CWindowObject void turnPageRight(); public: - CSpellWindow(const CGHeroInstance * _myHero, CPlayerInterface * _myInt, bool openOnBattleSpells = true); //c-tor - ~CSpellWindow(); //d-tor + CSpellWindow(const CGHeroInstance * _myHero, CPlayerInterface * _myInt, bool openOnBattleSpells = true); + ~CSpellWindow(); void fexitb(); void fadvSpellsb(); diff --git a/client/windows/CTradeWindow.h b/client/windows/CTradeWindow.h index 966c9b8d4..6e779ade7 100644 --- a/client/windows/CTradeWindow.h +++ b/client/windows/CTradeWindow.h @@ -109,8 +109,8 @@ public: void sliderMoved(int to); void makeDeal(); void selectionChanged(bool side) override; //true == left - CMarketplaceWindow(const IMarket *Market, const CGHeroInstance *Hero = nullptr, EMarketMode::EMarketMode Mode = EMarketMode::RESOURCE_RESOURCE); //c-tor - ~CMarketplaceWindow(); //d-tor + CMarketplaceWindow(const IMarket *Market, const CGHeroInstance *Hero = nullptr, EMarketMode::EMarketMode Mode = EMarketMode::RESOURCE_RESOURCE); + ~CMarketplaceWindow(); Point selectionOffset(bool Left) const override; std::string selectionSubtitle(bool Left) const override; @@ -128,10 +128,10 @@ class CAltarWindow : public CTradeWindow { CAnimImage * artIcon; public: - CAltarWindow(const IMarket *Market, const CGHeroInstance *Hero, EMarketMode::EMarketMode Mode); //c-tor + CAltarWindow(const IMarket *Market, const CGHeroInstance *Hero, EMarketMode::EMarketMode Mode); void getExpValues(); - ~CAltarWindow(); //d-tor + ~CAltarWindow(); std::vector sacrificedUnits, //[slot_nr] -> how many creatures from that slot will be sacrificed expPerUnit; diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 45d848068..e6f0ec9a1 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -999,7 +999,7 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2, garr->addSplitBtn(new CButton( Point(740, 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), std::bind(&CGarrisonInt::splitClick, garr))); } -CExchangeWindow::~CExchangeWindow() //d-tor +CExchangeWindow::~CExchangeWindow() { artifs[0]->commonInfo = nullptr; artifs[1]->commonInfo = nullptr; diff --git a/client/windows/GUIClasses.h b/client/windows/GUIClasses.h index b72496df8..fcfe280c5 100644 --- a/client/windows/GUIClasses.h +++ b/client/windows/GUIClasses.h @@ -134,8 +134,8 @@ class CLevelWindow : public CWindowObject void selectionChanged(unsigned to); public: - CLevelWindow(const CGHeroInstance *hero, PrimarySkill::PrimarySkill pskill, std::vector &skills, std::function callback); //c-tor - ~CLevelWindow(); //d-tor + CLevelWindow(const CGHeroInstance *hero, PrimarySkill::PrimarySkill pskill, std::vector &skills, std::function callback); + ~CLevelWindow(); }; @@ -222,7 +222,7 @@ private: void closeAndPushEvent(int eventType, int code = 0); public: - CSystemOptionsWindow(); //c-tor + CSystemOptionsWindow(); }; class CTavernWindow : public CWindowObject @@ -252,8 +252,8 @@ public: CButton *thiefGuild, *cancel, *recruit; const CGObjectInstance *tavernObj; - CTavernWindow(const CGObjectInstance *TavernObj); //c-tor - ~CTavernWindow(); //d-tor + CTavernWindow(const CGObjectInstance *TavernObj); + ~CTavernWindow(); void recruitb(); void thievesguildb(); @@ -284,8 +284,8 @@ public: void prepareBackground(); //prepares or redraws bg - CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2, QueryID queryID); //c-tor - ~CExchangeWindow(); //d-tor + CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2, QueryID queryID); + ~CExchangeWindow(); }; /// Here you can buy ships @@ -356,7 +356,7 @@ public: void makeDeal(); void addAll(); void updateGarrisons() override; - CTransformerWindow(const CGHeroInstance * _hero, const CGTownInstance * _town); //c-tor + CTransformerWindow(const CGHeroInstance * _hero, const CGTownInstance * _town); }; class CUniversityWindow : public CWindowObject @@ -385,7 +385,7 @@ public: CButton *cancel; CGStatusBar *bar; - CUniversityWindow(const CGHeroInstance * _hero, const IMarket * _market); //c-tor + CUniversityWindow(const CGHeroInstance * _hero, const IMarket * _market); }; /// Confirmation window for University @@ -396,7 +396,7 @@ public: CGStatusBar *bar; CButton *confirm, *cancel; - CUnivConfirmWindow(CUniversityWindow * PARENT, int SKILL, bool available); //c-tor + CUnivConfirmWindow(CUniversityWindow * PARENT, int SKILL, bool available); void makeDeal(int skill); }; @@ -431,7 +431,7 @@ private: void makeDeal(SlotID slot);//-1 for upgrading all creatures int getState(SlotID slot); //-1 = no creature 0=can't upgrade, 1=upgraded, 2=can upgrade public: - CHillFortWindow(const CGHeroInstance * visitor, const CGObjectInstance * object); //c-tor + CHillFortWindow(const CGHeroInstance * visitor, const CGObjectInstance * object); void updateGarrisons() override;//update buttons after garrison changes }; diff --git a/client/windows/InfoWindows.h b/client/windows/InfoWindows.h index 946e1e627..98de2b340 100644 --- a/client/windows/InfoWindows.h +++ b/client/windows/InfoWindows.h @@ -31,8 +31,8 @@ class CSimpleWindow : public CIntObject public: SDL_Surface * bitmap; //background virtual void show(SDL_Surface * to) override; - CSimpleWindow():bitmap(nullptr){}; //c-tor - virtual ~CSimpleWindow(); //d-tor + CSimpleWindow():bitmap(nullptr){}; + virtual ~CSimpleWindow(); }; /// text + comp. + ok button @@ -55,9 +55,9 @@ public: void showAll(SDL_Surface * to) override; void sliderMoved(int to); - CInfoWindow(std::string Text, PlayerColor player, const TCompsInfo &comps = TCompsInfo(), const TButtonsInfo &Buttons = TButtonsInfo(), bool delComps = true); //c-tor - CInfoWindow(); //c-tor - ~CInfoWindow(); //d-tor + CInfoWindow(std::string Text, PlayerColor player, const TCompsInfo &comps = TCompsInfo(), const TButtonsInfo &Buttons = TButtonsInfo(), bool delComps = true); + CInfoWindow(); + ~CInfoWindow(); //use only before the game starts! (showYesNoDialog in LOCPLINT must be used then) static void showInfoDialog( const std::string & text, const std::vector *components, bool DelComps = true, PlayerColor player = PlayerColor(1)); @@ -77,7 +77,7 @@ public: void clickRight(tribool down, bool previousState) override; CRClickPopup(); - virtual ~CRClickPopup(); //d-tor + virtual ~CRClickPopup(); static CIntObject* createInfoWin(Point position, const CGObjectInstance * specific); static void createAndPush(const std::string &txt, const CInfoWindow::TCompsInfo &comps = CInfoWindow::TCompsInfo()); @@ -94,8 +94,8 @@ public: void show(SDL_Surface * to) override; void showAll(SDL_Surface * to) override; - CRClickPopupInt(IShowActivatable *our, bool deleteInt); //c-tor - virtual ~CRClickPopupInt(); //d-tor + CRClickPopupInt(IShowActivatable *our, bool deleteInt); + virtual ~CRClickPopupInt(); }; class CInfoPopup : public CRClickPopup @@ -105,12 +105,12 @@ public: SDL_Surface * bitmap; //popup background void close() override; void show(SDL_Surface * to) override; - CInfoPopup(SDL_Surface * Bitmap, int x, int y, bool Free=false); //c-tor - CInfoPopup(SDL_Surface * Bitmap, const Point &p, EAlignment alignment, bool Free=false); //c-tor - CInfoPopup(SDL_Surface * Bitmap = nullptr, bool Free = false); //default c-tor + CInfoPopup(SDL_Surface * Bitmap, int x, int y, bool Free=false); + CInfoPopup(SDL_Surface * Bitmap, const Point &p, EAlignment alignment, bool Free=false); + CInfoPopup(SDL_Surface * Bitmap = nullptr, bool Free = false); void init(int x, int y); - ~CInfoPopup(); //d-tor + ~CInfoPopup(); }; /// popup on adventure map for town\hero objects @@ -129,7 +129,7 @@ class CSelWindow : public CInfoWindow public: void selectionChange(unsigned to); void madeChoice(); //looks for selected component and calls callback - CSelWindow(const std::string& text, PlayerColor player, int charperline ,const std::vector &comps, const std::vector > > &Buttons, QueryID askID); //c-tor - CSelWindow(){}; //c-tor + CSelWindow(const std::string& text, PlayerColor player, int charperline ,const std::vector &comps, const std::vector > > &Buttons, QueryID askID); + CSelWindow(){}; //notification - this class inherits important destructor from CInfoWindow }; diff --git a/lib/CConfigHandler.h b/lib/CConfigHandler.h index 85069ead8..35d25aae7 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); //c-tor - ~CConfigHandler(void); //d-tor + CConfigHandler(void); + ~CConfigHandler(void); GUIOptions *go() { return current; }; void SetResolution(int x, int y) diff --git a/lib/CConsoleHandler.h b/lib/CConsoleHandler.h index 2351d6fb7..c521acdd5 100644 --- a/lib/CConsoleHandler.h +++ b/lib/CConsoleHandler.h @@ -30,8 +30,8 @@ enum EConsoleTextColor class DLL_LINKAGE CConsoleHandler { public: - CConsoleHandler(); //c-tor - ~CConsoleHandler(); //d-tor + CConsoleHandler(); + ~CConsoleHandler(); void start(); //starts listening thread template void print(const T &data, bool addNewLine = false, EConsoleTextColor::EConsoleTextColor color = EConsoleTextColor::DEFAULT, bool printToStdErr = false) diff --git a/lib/CHeroHandler.h b/lib/CHeroHandler.h index 2003a2663..70963ee76 100644 --- a/lib/CHeroHandler.h +++ b/lib/CHeroHandler.h @@ -243,8 +243,8 @@ public: void loadObject(std::string scope, std::string name, const JsonNode & data) override; void loadObject(std::string scope, std::string name, const JsonNode & data, size_t index) override; - CHeroHandler(); //c-tor - ~CHeroHandler(); //d-tor + CHeroHandler(); + ~CHeroHandler(); std::vector getDefaultAllowed() const override; diff --git a/lib/CStack.h b/lib/CStack.h index 17a40f2af..f28ea8fd0 100644 --- a/lib/CStack.h +++ b/lib/CStack.h @@ -152,9 +152,9 @@ public: si32 cloneID; std::set state; - CStack(const CStackInstance * base, PlayerColor O, int I, ui8 Side, SlotID S); //c-tor - CStack(const CStackBasicDescriptor * stack, PlayerColor O, int I, ui8 Side, SlotID S = SlotID(255)); //c-tor - CStack(); //c-tor + CStack(const CStackInstance * base, PlayerColor O, int I, ui8 Side, SlotID S); + CStack(const CStackBasicDescriptor * stack, PlayerColor O, int I, ui8 Side, SlotID S = SlotID(255)); + CStack(); ~CStack(); int32_t getKilled() const; diff --git a/lib/logging/CLogger.cpp b/lib/logging/CLogger.cpp index f785559c0..3aaf8420c 100644 --- a/lib/logging/CLogger.cpp +++ b/lib/logging/CLogger.cpp @@ -24,7 +24,8 @@ namespace ELogLevel case INFO: return ANDROID_LOG_INFO; case WARN: return ANDROID_LOG_WARN; case ERROR: return ANDROID_LOG_ERROR; - default:; + default: + break; } return ANDROID_LOG_UNKNOWN; } diff --git a/server/CVCMIServer.h b/server/CVCMIServer.h index b59f8c0fe..497513aa3 100644 --- a/server/CVCMIServer.h +++ b/server/CVCMIServer.h @@ -50,8 +50,8 @@ class CVCMIServer CConnection *firstConnection; public: - CVCMIServer(); //c-tor - ~CVCMIServer(); //d-tor + CVCMIServer(); + ~CVCMIServer(); void start(); CGameHandler *initGhFromHostingConnection(CConnection &c);