Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2015, 10:20:29 PM (9 years ago)
Author:
landauf
Message:

always use 'virtual' in the declaration of virtual functions even if they are inherited

Location:
code/branches/cpp11_v2/src/orxonox
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/PlayerManager.h

    r10817 r10845  
    5050                { return this->clients_; }
    5151
    52             void clientConnected(unsigned int clientID) override;
    53             void clientDisconnected(unsigned int clientID) override;
     52            virtual void clientConnected(unsigned int clientID) override;
     53            virtual void clientDisconnected(unsigned int clientID) override;
    5454            void disconnectAllClients();
    5555
  • code/branches/cpp11_v2/src/orxonox/Scene.h

    r10818 r10845  
    8080                { return this->radar_; }
    8181
    82             inline virtual uint32_t getSceneID() const override { return this->getObjectID(); }
     82            virtual inline uint32_t getSceneID() const override { return this->getObjectID(); }
    8383
    8484            virtual void tick(float dt) override;
  • code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.h

    r10817 r10845  
    125125       * history window of the full chat window)
    126126       */
    127       void incomingChat(const std::string& message, const std::string& name) override;
     127      virtual void incomingChat(const std::string& message, const std::string& name) override;
    128128
    129129      /** \param full true means show full chat window with history,
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.h

    r10817 r10845  
    7474        private:
    7575            void updatePublicShape();
    76             inline virtual btCollisionShape* createNewShape() const override
     76            virtual inline btCollisionShape* createNewShape() const override
    7777                { assert(false); return nullptr; }
    7878
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.h

    r10817 r10845  
    4949
    5050        private:
    51             void parentChanged() override;
     51            virtual void parentChanged() override;
    5252
    5353            WorldEntity* worldEntityOwner_;
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSClient.h

    r10817 r10845  
    4343        ~GSClient();
    4444
    45         void activate() override;
    46         void deactivate() override;
    47         void update(const Clock& time) override;
     45        virtual void activate() override;
     46        virtual void deactivate() override;
     47        virtual void update(const Clock& time) override;
    4848    };
    4949}
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSGraphics.h

    r10817 r10845  
    5353        ~GSGraphics();
    5454
    55         void activate() override;
    56         void deactivate() override;
    57         void update(const Clock& time) override;
     55        virtual void activate() override;
     56        virtual void deactivate() override;
     57        virtual void update(const Clock& time) override;
    5858
    5959    private:
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.h

    r10817 r10845  
    4444        ~GSLevel();
    4545
    46         void activate() override;
    47         void deactivate() override;
    48         void update(const Clock& time) override;
     46        virtual void activate() override;
     47        virtual void deactivate() override;
     48        virtual void update(const Clock& time) override;
    4949
    5050        static void startMainMenu(void); //!< Starts the MainMenu
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.h

    r10817 r10845  
    4444        ~GSMainMenu();
    4545
    46         void activate() override;
    47         void deactivate() override;
    48         void update(const Clock& time) override;
     46        virtual void activate() override;
     47        virtual void deactivate() override;
     48        virtual void update(const Clock& time) override;
    4949
    5050        void setConfigValues();
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSMasterServer.h

    r10817 r10845  
    4545      ~GSMasterServer();
    4646
    47       void activate() override;
    48       void deactivate() override;
    49       void update(const Clock& time) override;
     47      virtual void activate() override;
     48      virtual void deactivate() override;
     49      virtual void update(const Clock& time) override;
    5050
    5151    private:
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSRoot.h

    r10817 r10845  
    4444        static void printObjects();
    4545
    46         void activate() override;
    47         void deactivate() override;
    48         void update(const Clock& time) override;
     46        virtual void activate() override;
     47        virtual void deactivate() override;
     48        virtual void update(const Clock& time) override;
    4949
    5050        // this has to be public because proteced triggers a bug in msvc
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSServer.h

    r10817 r10845  
    4343        ~GSServer();
    4444
    45         void activate() override;
    46         void deactivate() override;
    47         void update(const Clock& time) override;
     45        virtual void activate() override;
     46        virtual void deactivate() override;
     47        virtual void update(const Clock& time) override;
    4848
    4949    private:
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSStandalone.h

    r10817 r10845  
    4141        ~GSStandalone();
    4242
    43         void activate() override;
    44         void deactivate() override;
    45         void update(const Clock& time) override;
     43        virtual void activate() override;
     44        virtual void deactivate() override;
     45        virtual void update(const Clock& time) override;
    4646
    4747    private:
  • code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.h

    r10817 r10845  
    7878            void grantPigBoost(SpaceShip* spaceship); // Grant the piggy a boost.
    7979            void resetSpeedFactor(SpaceShip* spaceship);
    80             void tick (float dt) override;// used to end the game
    81             SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const override;
     80            virtual void tick (float dt) override;// used to end the game
     81            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const override;
    8282
    8383
  • code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.h

    r10817 r10845  
    8080
    8181            void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining".
    82             void tick (float dt) override; //!< used to end the game
     82            virtual void tick (float dt) override; //!< used to end the game
    8383    };
    8484}
  • code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.h

    r10817 r10845  
    8080            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr) override; //!< If a player shoot's an opponent, his punishment countdown will be resetted.
    8181            virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn) override; //!< Resets punishment time and respawn delay.
    82             void tick (float dt) override; //!< used to end the game
     82            virtual void tick (float dt) override; //!< used to end the game
    8383            virtual void end() override; //!< Sends an end message.
    8484            void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining".
  • code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.h

    r10817 r10845  
    4343
    4444            void setConfigValues();
    45             void tick (float dt) override;
     45            virtual void tick (float dt) override;
    4646            void addDestroyer(Destroyer* destroyer);
    4747            inline Destroyer* getDestroyer() const
  • code/branches/cpp11_v2/src/orxonox/graphics/Camera.h

    r10817 r10845  
    7272            void configvaluecallback_changedNearClipDistance();
    7373
    74             void windowResized(unsigned int newWidth, unsigned int newHeight) override;
     74            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) override;
    7575
    7676            Ogre::Camera*    camera_;
  • code/branches/cpp11_v2/src/orxonox/infos/Bot.h

    r10817 r10845  
    4545            void setConfigValues();
    4646
    47             inline bool isInitialized() const override
     47            virtual inline bool isInitialized() const override
    4848                { return true; }
    49             inline float getPing() const override
     49            virtual inline float getPing() const override
    5050                { return 0; }
    51             inline float getPacketLossRatio() const override
     51            virtual inline float getPacketLossRatio() const override
    5252                { return 0; }
    5353
  • code/branches/cpp11_v2/src/orxonox/infos/HumanPlayer.h

    r10817 r10845  
    4545            void setConfigValues();
    4646
    47             bool isInitialized() const override;
    48             float getPing() const override;
    49             float getPacketLossRatio() const override;
     47            virtual bool isInitialized() const override;
     48            virtual float getPing() const override;
     49            virtual float getPacketLossRatio() const override;
    5050
    5151            void setClientID(unsigned int clientID);
  • code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h

    r10817 r10845  
    7777            PickupCarrier(); //!< Constructor.
    7878            virtual ~PickupCarrier(); //!< Destructor.
    79             void preDestroy(void) override; //!< Is called before the PickupCarrier is effectively destroyed.
     79            virtual void preDestroy(void) override; //!< Is called before the PickupCarrier is effectively destroyed.
    8080
    8181            bool isTarget(const Pickupable* pickup) const; //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
  • code/branches/cpp11_v2/src/orxonox/overlays/GUISheet.h

    r10817 r10845  
    4444        ~GUISheet();
    4545
    46         void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     46        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    4848        void show();
  • code/branches/cpp11_v2/src/orxonox/overlays/InGameConsole.h

    r10817 r10845  
    5353        void setConfigValues();
    5454
    55         void preUpdate(const Clock& time) override;
    56         void postUpdate(const Clock& time) override { /*no action*/ }
     55        virtual void preUpdate(const Clock& time) override;
     56        virtual void postUpdate(const Clock& time) override { /*no action*/ }
    5757
    5858        static void openConsole();
     
    6565        void deactivate();
    6666
    67         void linesChanged() override;
    68         void lineAdded() override;
    69         void inputChanged() override;
    70         void cursorChanged() override;
    71         void executed() override;
    72         void exit() override;
     67        virtual void linesChanged() override;
     68        virtual void lineAdded() override;
     69        virtual void inputChanged() override;
     70        virtual void cursorChanged() override;
     71        virtual void executed() override;
     72        virtual void exit() override;
    7373
    7474        void shiftLines();
     
    7777        void print(const std::string& text, Shell::LineType type, int index, bool alwaysShift = false);
    7878
    79         void windowResized(unsigned int newWidth, unsigned int newHeight) override;
     79        virtual void windowResized(unsigned int newWidth, unsigned int newHeight) override;
    8080
    8181        // config value related
  • code/branches/cpp11_v2/src/orxonox/overlays/OrxonoxOverlay.h

    r10817 r10845  
    206206
    207207    private:
    208         void windowResized(unsigned int newWidth, unsigned int newHeight) override;
     208        virtual void windowResized(unsigned int newWidth, unsigned int newHeight) override;
    209209
    210210        static unsigned int hudOverlayCounter_s;   //!< Static counter for hud elements
  • code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.h

    r10817 r10845  
    5050        AmbientSound();
    5151
    52         void play() override;
    53         bool stop() override;
    54         void pause() override;
     52        virtual void play() override;
     53        virtual bool stop() override;
     54        virtual void pause() override;
    5555
    5656        bool setAmbientSource(const std::string& source);
     
    6666
    6767    private:
    68         void preDestroy() override;
    69         float getRealVolume() override;
    70         bool moodChanged(const std::string& mood) override;
     68        virtual void preDestroy() override;
     69        virtual float getRealVolume() override;
     70        virtual bool moodChanged(const std::string& mood) override;
    7171        inline void ambientSourceChanged()
    7272            { this->setAmbientSource(this->ambientSource_); }
  • code/branches/cpp11_v2/src/orxonox/sound/SoundManager.h

    r10817 r10845  
    6868        ~SoundManager();
    6969
    70         void preUpdate(const Clock& time) override;
    71         void postUpdate(const Clock& time) override { /*no action*/ }
     70        virtual void preUpdate(const Clock& time) override;
     71        virtual void postUpdate(const Clock& time) override { /*no action*/ }
    7272        void setConfigValues();
    7373
  • code/branches/cpp11_v2/src/orxonox/sound/WorldAmbientSound.h

    r10817 r10845  
    5050            virtual ~WorldAmbientSound();
    5151
    52             void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    53             void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
     52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     53            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    5454
    5555            virtual void changedActivity() override;
  • code/branches/cpp11_v2/src/orxonox/sound/WorldSound.h

    r10817 r10845  
    4747        WorldSound(Context* context);
    4848
    49         void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    50         void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    51         void changedActivity() override;
     49        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     50        virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
     51        virtual void changedActivity() override;
    5252
    53         void tick(float dt) override;
     53        virtual void tick(float dt) override;
    5454
    5555    protected:
     
    5858    private:
    5959        void registerVariables();
    60         void initialiseSource() override;
    61         float getRealVolume() override;
     60        virtual void initialiseSource() override;
     61        virtual float getRealVolume() override;
    6262    };
    6363}
  • code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.h

    r10817 r10845  
    141141            using MobileEntity::setAngularVelocity;
    142142
    143             void setPosition(const Vector3& position) override;
    144             void setOrientation(const Quaternion& orientation) override;
    145             void setVelocity(const Vector3& velocity) override;
    146             void setAngularVelocity(const Vector3& velocity) override;
     143            virtual void setPosition(const Vector3& position) override;
     144            virtual void setOrientation(const Quaternion& orientation) override;
     145            virtual void setVelocity(const Vector3& velocity) override;
     146            virtual void setAngularVelocity(const Vector3& velocity) override;
    147147
    148148            inline bool hasLocalController() const
     
    214214
    215215            // Bullet btMotionState related
    216             void setWorldTransform(const btTransform& worldTrans) override;
     216            virtual void setWorldTransform(const btTransform& worldTrans) override;
    217217
    218218            unsigned int server_overwrite_;
  • code/branches/cpp11_v2/src/orxonox/worldentities/MobileEntity.h

    r10817 r10845  
    6464            inline void setVelocity(float x, float y, float z)
    6565                { this->setVelocity(Vector3(x, y, z)); }
    66             inline const Vector3& getVelocity() const override
     66            virtual inline const Vector3& getVelocity() const override
    6767                { return this->linearVelocity_; }
    6868            /**
     
    109109            // Bullet btMotionState related
    110110            virtual void setWorldTransform(const btTransform& worldTrans) override;
    111             void getWorldTransform(btTransform& worldTrans) const override;
     111            virtual void getWorldTransform(btTransform& worldTrans) const override;
    112112
    113113            Vector3 linearAcceleration_;
  • code/branches/cpp11_v2/src/orxonox/worldentities/MovableEntity.h

    r10817 r10845  
    5252            using WorldEntity::setOrientation;
    5353
    54             inline void setPosition(const Vector3& position) override
     54            virtual inline void setPosition(const Vector3& position) override
    5555                { MobileEntity::setPosition(position); this->overwrite_position_ = this->getPosition(); }
    56             inline void setOrientation(const Quaternion& orientation) override
     56            virtual inline void setOrientation(const Quaternion& orientation) override
    5757                { MobileEntity::setOrientation(orientation); this->overwrite_orientation_ = this->getOrientation(); }
    5858
     
    7979        private:
    8080            void registerVariables();
    81             void clientConnected(unsigned int clientID) override;
    82             void clientDisconnected(unsigned int clientID) override;
     81            virtual void clientConnected(unsigned int clientID) override;
     82            virtual void clientDisconnected(unsigned int clientID) override;
    8383            void resynchronize();
    8484
  • code/branches/cpp11_v2/src/orxonox/worldentities/StaticEntity.h

    r10817 r10845  
    5555            using WorldEntity::setOrientation;
    5656
    57             void setPosition(const Vector3& position) override;
    58             void setOrientation(const Quaternion& orientation) override;
     57            virtual void setPosition(const Vector3& position) override;
     58            virtual void setOrientation(const Quaternion& orientation) override;
    5959
    6060        private:
    6161            void registerVariables();
    62             bool isCollisionTypeLegal(CollisionType type) const override;
     62            virtual bool isCollisionTypeLegal(CollisionType type) const override;
    6363
    6464            // network callbacks
     
    6969
    7070            // Bullet btMotionState related
    71             void setWorldTransform(const btTransform& worldTrans) override;
    72             void getWorldTransform(btTransform& worldTrans) const override;
     71            virtual void setWorldTransform(const btTransform& worldTrans) override;
     72            virtual void getWorldTransform(btTransform& worldTrans) const override;
    7373    };
    7474}
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/FpsPlayer.h

    r10818 r10845  
    6969            virtual void fire();
    7070
    71             bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
     71            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    7272
    7373            virtual void addedWeaponPack(WeaponPack* wPack);
Note: See TracChangeset for help on using the changeset viewer.