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/objects
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/objects/Attacher.h

    r9667 r10817  
    5151            virtual ~Attacher() {}
    5252
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     53            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5454
    55             virtual void processEvent(Event& event);
    56             virtual void changedActivity();
    57             virtual void changedVisibility();
     55            virtual void processEvent(Event& event) override;
     56            virtual void changedActivity() override;
     57            virtual void changedVisibility() override;
    5858
    5959            void addObject(WorldEntity* object);
     
    6464                { return this->targetname_; }
    6565
    66             void loadedNewXMLName(BaseObject* object);
     66            void loadedNewXMLName(BaseObject* object) override;
    6767
    6868        private:
  • code/branches/cpp11_v2/src/modules/objects/ForceField.h

    r10622 r10817  
    9292            virtual ~ForceField();
    9393
    94             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a ForceField object through XML.
     94            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a ForceField object through XML.
    9595            void registerVariables(); //!< Registers the variables that should get synchronised over the network
    96             virtual void tick(float dt); //!< A method that is called every tick.
     96            virtual void tick(float dt) override; //!< A method that is called every tick.
    9797           
    9898
  • code/branches/cpp11_v2/src/modules/objects/Planet.h

    r10624 r10817  
    5252            virtual ~Planet();
    5353
    54             virtual void tick(float dt);
     54            virtual void tick(float dt) override;
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5757
    58             virtual void changedVisibility();
     58            virtual void changedVisibility() override;
    5959
    6060            inline void setMeshSource(const std::string& meshname)
  • code/branches/cpp11_v2/src/modules/objects/Script.h

    r9667 r10817  
    9898            virtual ~Script();
    9999
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Script object through XML.
    101             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a port that can be used to channel events and react to them.
     100            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a Script object through XML.
     101            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a port that can be used to channel events and react to them.
    102102
    103103            bool trigger(bool triggered, BaseObject* trigger); //!< Is called when an event comes in trough the event port.
     
    168168                { return this->forAll_; }
    169169
    170             virtual void clientConnected(unsigned int clientId); //!< Callback that is called when a new client has connected.
    171             virtual void clientDisconnected(unsigned int clientid) {}
     170            virtual void clientConnected(unsigned int clientId) override; //!< Callback that is called when a new client has connected.
     171            virtual void clientDisconnected(unsigned int clientid) override {}
    172172
    173173        private:
  • code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.h

    r10769 r10817  
    9393            int getReaction();
    9494
    95             void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     95            void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    9696
    97             void tick(float dt);
     97            void tick(float dt) override;
    9898
    9999        private:
  • code/branches/cpp11_v2/src/modules/objects/Turret.h

    r10622 r10817  
    6161            virtual ~Turret();
    6262
    63             virtual void rotatePitch(const Vector2& value);
    64             virtual void rotateYaw(const Vector2& value);
    65             virtual void rotateRoll(const Vector2& value);
     63            virtual void rotatePitch(const Vector2& value) override;
     64            virtual void rotateYaw(const Vector2& value) override;
     65            virtual void rotateRoll(const Vector2& value) override;
    6666            virtual float isInRange(const WorldEntity* target);
    6767            virtual void aimAtPosition(const Vector3 &position);
    6868
    69             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    70             virtual void tick(float dt);
     69            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     70            virtual void tick(float dt) override;
    7171
    7272            /** @brief Sets the maximum distance the turret is allowed to shoot. @param radius The distance*/
Note: See TracChangeset for help on using the changeset viewer.