Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 21, 2016, 1:59:04 PM (8 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/controllers/ScriptController.cc

    r11071 r11083  
    227227          {
    228228            // Specify the axis
    229             Vector3* a;
     229            Vector3 a;
    230230              switch ((int) currentEvent.d) {
    231231                case 3:
    232                   a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl),
     232                  a = Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl),
    233233                                  this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
    234234                                  this->currentEvent.v1.z);
    235235                break;
    236236                case 2:
    237                   a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl),
     237                  a = Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl),
    238238                                  this->currentEvent.v1.y,
    239239                                  this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
    240240                break;
    241241                case 1:
    242                   a = new Vector3(this->currentEvent.v1.x,
     242                  a = Vector3(this->currentEvent.v1.x,
    243243                                  this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
    244244                                  this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
     
    246246              }
    247247
    248             this->entity_->setPosition(*a);
     248            this->entity_->setPosition(a);
    249249
    250250            /* Look at the specified position */
Note: See TracChangeset for help on using the changeset viewer.