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

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h

    r10765 r10817  
    6161            virtual ~CollectiblePickup(); //! Destructor.
    6262
    63             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    64             virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
     63            virtual void changedUsed(void) override; //!< Is called when the pickup has transited from used to unused or the other way around.
     64            virtual void changedPickedUp(void) override; //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    6565
    6666            /**
  • code/branches/cpp11_v2/src/modules/pickup/Pickup.h

    r9667 r10817  
    103103            virtual ~Pickup(); //!< Destructor.
    104104
    105             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     105            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    106106
    107             virtual const std::string& getRepresentationName() const
     107            virtual const std::string& getRepresentationName() const override
    108108                { return this->representationName_; }
    109109
     
    149149                { return this->getDurationType() == pickupDurationType::continuous; }
    150150
    151             virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
     151            virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    152152
    153153        protected:
    154             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     154            virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    155155
    156156            /**
  • code/branches/cpp11_v2/src/modules/pickup/PickupCollection.h

    r9667 r10817  
    7373            virtual ~PickupCollection(); //!< Destructor.
    7474
    75             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates an instance of this Class through XML.
     75            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates an instance of this Class through XML.
    7676
    77             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    78             virtual void changedCarrier(void); //!< Is called when the pickup has changed its PickupCarrier.
    79             virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
     77            virtual void changedUsed(void) override; //!< Is called when the pickup has transited from used to unused or the other way around.
     78            virtual void changedCarrier(void) override; //!< Is called when the pickup has changed its PickupCarrier.
     79            virtual void changedPickedUp(void) override; //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    8080
    81             virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
     81            virtual bool isTarget(const PickupCarrier* carrier) const override; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
    8282
    8383            inline void setRepresentationName(const std::string& name)
    8484                { this->representationName_ = name; }
    85             virtual const std::string& getRepresentationName() const
     85            virtual const std::string& getRepresentationName() const override
    8686                { return this->representationName_; }
    8787
     
    9898
    9999        protected:
    100             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     100            virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    101101
    102102        private:
  • code/branches/cpp11_v2/src/modules/pickup/PickupManager.h

    r10769 r10817  
    117117            PickupRepresentation* getRepresentation(const std::string& name); // tolua_export
    118118
    119             virtual void pickupChangedUsed(Pickupable* pickup, bool used); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
     119            virtual void pickupChangedUsed(Pickupable* pickup, bool used) override; //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
    120120            static void pickupChangedUsedNetwork(uint32_t pickup, bool inUse, bool usable, bool unusable); //!< Helper method to react to the change in the used status of a Pickupable.
    121             virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
     121            virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp) override; //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
    122122            static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
    123123
  • code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h

    r10765 r10817  
    9898            virtual ~PickupRepresentation(); //!< Destructor.
    9999
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PickupRepresentation object through XML.
     100            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a PickupRepresentation object through XML.
    101101
    102102            /**
     
    129129            inline const std::string& getInventoryRepresentation(void) const { return this->inventoryRepresentation_; } // tolua_export
    130130
    131             virtual void changedName();
     131            virtual void changedName() override;
    132132
    133133            StaticEntity* createSpawnerRepresentation(PickupSpawner* spawner); //!< Create a spawnerRepresentation for a specific PickupSpawner.
  • code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.h

    r9667 r10817  
    8282            static PickupSpawner* createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0);
    8383
    84             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< Method for creating a PickupSpawner through XML.
    85             virtual void tick(float dt); //!< Tick, checks if any Pawn is close enough to trigger.
     84            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;  //!< Method for creating a PickupSpawner through XML.
     85            virtual void tick(float dt) override; //!< Tick, checks if any Pawn is close enough to trigger.
    8686
    8787            /**
Note: See TracChangeset for help on using the changeset viewer.