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/jump
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/jump/Jump.cc

    r10768 r10817  
    9898                if (screenShiftSinceLastUpdate_ > center_->getSectionLength())
    9999                {
    100                     if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == false && figure_->rocketActive_ == false && addAdventure(adventureNumber_) == true)
     100                    if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == nullptr && figure_->rocketActive_ == nullptr && addAdventure(adventureNumber_) == true)
    101101                    {
    102102                        screenShiftSinceLastUpdate_ -= 2*center_->getSectionLength();
  • code/branches/cpp11_v2/src/modules/jump/Jump.h

    r10733 r10817  
    4040            Jump(Context* context);
    4141            virtual ~Jump();
    42             virtual void tick(float dt);
    43             virtual void start();
    44             virtual void end();
    45             virtual void spawnPlayer(PlayerInfo* player);
     42            virtual void tick(float dt) override;
     43            virtual void start() override;
     44            virtual void end() override;
     45            virtual void spawnPlayer(PlayerInfo* player) override;
    4646            int getScore(PlayerInfo* player) const;
    4747            float getFuel() const;
  • code/branches/cpp11_v2/src/modules/jump/JumpBoots.h

    r10733 r10817  
    4040            JumpBoots(Context* context);
    4141            virtual ~JumpBoots();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    44             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4545            virtual float getFuelState();
    4646        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.h

    r10733 r10817  
    108108            JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
    109109            virtual ~JumpCenterpoint() {}
    110             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
     110            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a JumpCenterpoint through XML.
    111111            void setPlatformStaticTemplate(const std::string& balltemplate)
    112112                { this->platformStaticTemplate_ = balltemplate; }
  • code/branches/cpp11_v2/src/modules/jump/JumpEnemy.h

    r10733 r10817  
    4646            JumpEnemy(Context* context);
    4747            virtual ~JumpEnemy();
    48             virtual void tick(float dt);
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050            void setFieldDimension(float width, float height)
    5151                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
  • code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc

    r10765 r10817  
    319319    bool JumpFigure::StartShield(JumpShield* shield)
    320320    {
    321         if (shieldActive_ == false)
     321        if (shieldActive_ == nullptr)
    322322        {
    323323            attach(shield);
  • code/branches/cpp11_v2/src/modules/jump/JumpFigure.h

    r10262 r10817  
    4040            JumpFigure(Context* context); //!< Constructor. Registers and initializes the object.
    4141            virtual ~JumpFigure() {}
    42             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    43             virtual void tick(float dt);
    44             virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    45             virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    46             virtual void rotateYaw(const Vector2& value);
    47             virtual void rotatePitch(const Vector2& value);
    48             virtual void rotateRoll(const Vector2& value);
     42            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     43            virtual void tick(float dt) override;
     44            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     45            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     46            virtual void rotateYaw(const Vector2& value) override;
     47            virtual void rotatePitch(const Vector2& value) override;
     48            virtual void rotateRoll(const Vector2& value) override;
    4949            void fire(unsigned int firemode);
    50             virtual void fired(unsigned int firemode);
     50            virtual void fired(unsigned int firemode) override;
    5151            virtual void JumpFromPlatform(JumpPlatform* platform);
    5252            virtual void JumpFromSpring(JumpSpring* spring);
  • code/branches/cpp11_v2/src/modules/jump/JumpItem.h

    r10733 r10817  
    4747            JumpItem(Context* context);
    4848            virtual ~JumpItem();
    49             virtual void tick(float dt);
    50             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     49            virtual void tick(float dt) override;
     50            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5151            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
    5252            virtual void setFigure(JumpFigure* newFigure);
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatform.h

    r10733 r10817  
    4646            JumpPlatform(Context* context);
    4747            virtual ~JumpPlatform();
    48             virtual void tick(float dt);
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050            void setFigure(JumpFigure* newFigure);
    5151            virtual void touchFigure();
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformDisappear.h

    r10733 r10817  
    4646            JumpPlatformDisappear(Context* context);
    4747            virtual ~JumpPlatformDisappear();
    48             virtual void tick(float dt);
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050            virtual void setProperties(bool active);
    5151            virtual bool isActive();
    52             virtual void touchFigure();
     52            virtual void touchFigure() override;
    5353
    5454        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformFake.h

    r10733 r10817  
    4646            JumpPlatformFake(Context* context);
    4747            virtual ~JumpPlatformFake();
    48             virtual void tick(float dt);
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050    };
    5151}
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformHMove.h

    r10733 r10817  
    4141            JumpPlatformHMove(Context* context);
    4242            virtual ~JumpPlatformHMove();
    43             virtual void tick(float dt);
    44             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     43            virtual void tick(float dt) override;
     44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4545            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    46             virtual void touchFigure();
     46            virtual void touchFigure() override;
    4747
    4848        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformStatic.h

    r10733 r10817  
    4141            virtual ~JumpPlatformStatic();
    4242
    43             virtual void tick(float dt);
    44             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     43            virtual void tick(float dt) override;
     44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4545
    46             virtual void touchFigure();
     46            virtual void touchFigure() override;
    4747    };
    4848}
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.h

    r10733 r10817  
    4646            JumpPlatformTimer(Context* context);
    4747            virtual ~JumpPlatformTimer();
    48             virtual void tick(float dt);
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050            virtual void setProperties(float time);
    5151            virtual bool isActive(void);
    52             virtual void touchFigure();
     52            virtual void touchFigure() override;
    5353
    5454            void setEffectPath(const std::string& effectPath)
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformVMove.h

    r10733 r10817  
    4040            JumpPlatformVMove(Context* context);
    4141            virtual ~JumpPlatformVMove();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4444            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    45             virtual void touchFigure();
     45            virtual void touchFigure() override;
    4646
    4747        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpProjectile.h

    r10624 r10817  
    4343            virtual ~JumpProjectile();
    4444
    45             virtual void tick(float dt);
     45            virtual void tick(float dt) override;
    4646
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4848
    4949            void setFieldDimension(float width, float height)
  • code/branches/cpp11_v2/src/modules/jump/JumpPropeller.h

    r10733 r10817  
    4040            JumpPropeller(Context* context);
    4141            virtual ~JumpPropeller();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    44             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4545            virtual float getFuelState();
    4646        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpRocket.h

    r10733 r10817  
    4040            JumpRocket(Context* context);
    4141            virtual ~JumpRocket();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    44             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4545            virtual float getFuelState();
    4646        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpScore.h

    r10262 r10817  
    4444            virtual ~JumpScore();
    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            void setShowScore(const bool showScore)
  • code/branches/cpp11_v2/src/modules/jump/JumpShield.h

    r10733 r10817  
    4040            JumpShield(Context* context);
    4141            virtual ~JumpShield();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    44             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4545            virtual float getFuelState();
    4646        protected:
  • code/branches/cpp11_v2/src/modules/jump/JumpSpring.h

    r10733 r10817  
    4040            JumpSpring(Context* context);
    4141            virtual ~JumpSpring();
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4444            virtual void accelerateFigure();
    45             virtual void touchFigure();
     45            virtual void touchFigure() override;
    4646        protected:
    4747            float stretch_;
Note: See TracChangeset for help on using the changeset viewer.