Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 21, 2016, 1:59:04 PM (9 years ago)
Author:
muemart
Message:

Fix some clang-tidy warnings.
Also, Serialise.h was doing some C-style casts that ended up being const casts. I moved those const casts as close to the source as possible and changed the loadAndIncrease functions to not do that.

Location:
code/trunk/src/modules/objects
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/ForceField.cc

    r11071 r11083  
    6363        //Standard Values
    6464        this->setDirection(Vector3::ZERO);
    65         this->setVelocity(100);
     65        this->setFieldVelocity(100);
    6666        this->setDiameter(500);
    6767        this->setMassDiameter(0);   //! We allow point-masses
     
    8888        SUPER(ForceField, XMLPort, xmlelement, mode);
    8989
    90         XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
     90        XMLPortParam(ForceField, "velocity", setFieldVelocity, getFieldVelocity, xmlelement, mode).defaultValues(100);
    9191        XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
    9292        XMLPortParam(ForceField, "massDiameter", setMassDiameter, getMassDiameter, xmlelement, mode).defaultValues(0);
  • code/trunk/src/modules/objects/ForceField.h

    r11071 r11083  
    9898            @param vel The velocity to be set.
    9999            */
    100             inline void setVelocity(float vel)
     100            inline void setFieldVelocity(float vel)
    101101                { this->velocity_ = vel; }
    102102            /**
     
    104104            @return Returns the velocity of the ForceField.
    105105            */
    106             inline float getVelocity()
     106            inline float getFieldVelocity()
    107107                { return this->velocity_; }
    108108
  • code/trunk/src/modules/objects/SpaceBoundaries.cc

    r11071 r11083  
    221221                    }
    222222                }
    223                 if(/* humanItem &&*/ abs(this->maxDistance_ - distance) < this->showDistance_ )
     223                if(/* humanItem &&*/ std::abs(this->maxDistance_ - distance) < this->showDistance_ )
    224224                {
    225225                    this->displayBoundaries(currentPawn, 1.0f - fabs(this->maxDistance_ - distance) / this->showDistance_); // Show the boundary
  • code/trunk/src/modules/objects/triggers/DistanceTrigger.h

    r11071 r11083  
    9797            virtual ~DistanceTrigger();
    9898
    99             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); // Method for creating a DistanceTrigger object through XML.
     99            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; // Method for creating a DistanceTrigger object through XML.
    100100
    101101            void addTarget(const std::string& targets); // Add some target to the DistanceTrigger.
  • code/trunk/src/modules/objects/triggers/EventTrigger.h

    r11071 r11083  
    7373            virtual ~EventTrigger();
    7474
    75             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); // Creates an event port.
     75            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; // Creates an event port.
    7676
    7777            /**
Note: See TracChangeset for help on using the changeset viewer.