Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Use emplace_back instead of push_back if beneficial

Location:
code/branches/cpp11_v2/src/libraries/core/config
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.cc

    r10768 r10918  
    191191                for (unsigned int i = this->valueVector_.size(); i <= index; i++)
    192192                {
    193                     this->valueVector_.push_back(MultiType());
     193                    this->valueVector_.emplace_back();
    194194                }
    195195            }
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h

    r10916 r10918  
    131131                this->value_ = V();
    132132                for (const D& defvalueElement : defvalue)
    133                     this->valueVector_.push_back(MultiType(defvalueElement));
     133                    this->valueVector_.emplace_back(defvalueElement);
    134134
    135135                this->initVector();
Note: See TracChangeset for help on using the changeset viewer.