Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2015, 7:10:56 PM (8 years ago)
Author:
muemart
Message:

Use emplace_back instead of push_back if beneficial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc

    r10765 r10918  
    8282        this->faceCounter_ = 0;
    8383       
    84         this->names_.push_back("fr");
    85         this->names_.push_back("lf");
    86         this->names_.push_back("bk");
    87         this->names_.push_back("rt");
    88         this->names_.push_back("up");
    89         this->names_.push_back("dn");
    90        
    91         this->rotations_.push_back(std::pair<int, int>(90, 0));
    92         this->rotations_.push_back(std::pair<int, int>(90, 0));
    93         this->rotations_.push_back(std::pair<int, int>(90, 0));
    94         this->rotations_.push_back(std::pair<int, int>(90, 90));
    95         this->rotations_.push_back(std::pair<int, int>(0, 180));
    96         this->rotations_.push_back(std::pair<int, int>(0, 90));
     84        this->names_.emplace_back("fr");
     85        this->names_.emplace_back("lf");
     86        this->names_.emplace_back("bk");
     87        this->names_.emplace_back("rt");
     88        this->names_.emplace_back("up");
     89        this->names_.emplace_back("dn");
     90       
     91        this->rotations_.emplace_back(90, 0);
     92        this->rotations_.emplace_back(90, 0);
     93        this->rotations_.emplace_back(90, 0);
     94        this->rotations_.emplace_back(90, 90);
     95        this->rotations_.emplace_back(0, 180);
     96        this->rotations_.emplace_back(0, 90);
    9797    }
    9898
Note: See TracChangeset for help on using the changeset viewer.