Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Use emplace_back instead of push_back if beneficial

Location:
code/branches/cpp11_v2/src/libraries/util/output
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc

    r10916 r10918  
    4747        this->configurableMaxLevel_ = level::none;
    4848        this->configurableAdditionalContextsMaxLevel_ = level::verbose;
    49         this->configurableAdditionalContexts_.push_back("example");
     49        this->configurableAdditionalContexts_.emplace_back("example");
    5050
    5151        this->changedConfigurableLevel();
  • code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc

    r10916 r10918  
    5757    void MemoryWriter::output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines)
    5858    {
    59         this->messages_.push_back(Message(level, context, lines));
     59        this->messages_.emplace_back(level, context, lines);
    6060    }
    6161
Note: See TracChangeset for help on using the changeset viewer.