Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2015, 11:40:28 AM (9 years ago)
Author:
muemart
Message:

Run clang-modernize -add-override
A few notes:

  • There are probably some overrides missing, especially in funky templatey code
  • Virtual methods with wrong signatures were not fixed, needs to be done by hand (only warnings get emitted)
Location:
code/branches/cpp11_v2/src/modules/dodgerace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.h

    r10624 r10817  
    6969            DodgeRace(Context* context);
    7070
    71             virtual void start();
    72             virtual void end();
     71            virtual void start() override;
     72            virtual void end() override;
    7373
    74             virtual void tick(float dt);
     74            virtual void tick(float dt) override;
    7575
    76             virtual void playerPreSpawn(PlayerInfo* player);
     76            virtual void playerPreSpawn(PlayerInfo* player) override;
    7777
    7878            void levelUp();
     
    8585            void setCenterpoint(DodgeRaceCenterPoint* center)
    8686                       { this->center_ = center; }
    87             virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
     87            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    8888
    8989            // checks if multiplier should be reset.
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.h

    r10624 r10817  
    5050            DodgeRaceCenterPoint(Context* context); //checks whether the gametype is actually DodgeRace.
    5151
    52             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5353
    5454        private:
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceHUDinfo.h

    r10234 r10817  
    4444            DodgeRaceHUDinfo(Context* context);
    4545
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void changedOwner();
     46            virtual void tick(float dt) override;
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     48            virtual void changedOwner() override;
    4949
    5050            inline void setShowPoints(bool value)
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.h

    r10624 r10817  
    5252            DodgeRaceShip(Context* context);
    5353
    54             virtual void tick(float dt);
     54            virtual void tick(float dt) override;
    5555
    5656            // overwrite for 2d movement
    57             virtual void moveFrontBack(const Vector2& value);
    58             virtual void moveRightLeft(const Vector2& value);
     57            virtual void moveFrontBack(const Vector2& value) override;
     58            virtual void moveRightLeft(const Vector2& value) override;
    5959
    6060            // Starts or stops fireing
    61             virtual void boost(bool bBoost);
     61            virtual void boost(bool bBoost) override;
    6262
    6363            //no rotation!
    64             virtual void rotateYaw(const Vector2& value){};
    65             virtual void rotatePitch(const Vector2& value){};
     64            virtual void rotateYaw(const Vector2& value) override{};
     65            virtual void rotatePitch(const Vector2& value) override{};
    6666
    6767            //return to main menu if game has ended.
    68             virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     68            virtual void rotateRoll(const Vector2& value) override{if (getGame()) if (getGame()->bEndGame) getGame()->end();};
    6969
    7070            virtual void updateLevel();
     
    7474
    7575        protected:
    76             virtual void death();
     76            virtual void death() override;
    7777
    7878        private:
Note: See TracChangeset for help on using the changeset viewer.