]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/object.cpp
Use emplace_back when a new object is being constructed
[libs/gl.git] / source / render / object.cpp
index e2e95a9b024d25b610d256ef8c6678d7bb53ff89..65e9a7ef083fc52db1f899906b7febaed96264a5 100644 (file)
@@ -112,7 +112,7 @@ void Object::update_bounding_sphere()
                for(unsigned j=0; j<n_vertices; ++j)
                {
                        const float *v = reinterpret_cast<const float *>(vertices[j]+offset);
-                       points.push_back(Vector3(v[0], v[1], (three ? v[2] : 0.0f)));
+                       points.emplace_back(v[0], v[1], (three ? v[2] : 0.0f));
                }
        }