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.cc

    r10916 r10918  
    259259            {
    260260                //Add the new line to the trace map
    261                 lineTrace_->push_back(std::vector<std::pair<std::string, size_t>>());
     261                lineTrace_->emplace_back();
    262262                //Add the source of the line at the end
    263                 lineTrace_->rbegin()->push_back(std::make_pair(filename, line + i));
     263                lineTrace_->rbegin()->emplace_back(filename, line + i);
    264264            }
    265265        }
Note: See TracChangeset for help on using the changeset viewer.