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/libraries/core/LuaState.h

    r10771 r10918  
    9595
    9696        void setTraceMap(std::shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> map)
    97             { map->push_back(std::vector<std::pair<std::string, size_t>>()); lineTrace_ = map; }
     97            { map->emplace_back(); lineTrace_ = map; }
    9898
    9999        void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; }
Note: See TracChangeset for help on using the changeset viewer.