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/tools/DebugDrawer.cc

    r10916 r10918  
    433433    int DebugDrawer::addLineVertex(const Ogre::Vector3& vertex, const Ogre::ColourValue& colour)
    434434    {
    435         lineVertices.push_back(VertexPair(vertex, colour));
     435        lineVertices.emplace_back(vertex, colour);
    436436        return linesIndex++;
    437437    }
     
    445445    int DebugDrawer::addTriangleVertex(const Ogre::Vector3& vertex, const Ogre::ColourValue& colour)
    446446    {
    447         triangleVertices.push_back(VertexPair(vertex, colour));
     447        triangleVertices.emplace_back(vertex, colour);
    448448        return trianglesIndex++;
    449449    }
Note: See TracChangeset for help on using the changeset viewer.