diff options
Diffstat (limited to 'source/blender/freestyle/intern/geometry')
-rw-r--r-- | source/blender/freestyle/intern/geometry/Bezier.cpp | 4 | ||||
-rw-r--r-- | source/blender/freestyle/intern/geometry/FitCurve.cpp | 2 | ||||
-rw-r--r-- | source/blender/freestyle/intern/geometry/GeomCleaner.cpp | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/geometry/Bezier.cpp b/source/blender/freestyle/intern/geometry/Bezier.cpp index 4ae30ff893c..4eec3d72db9 100644 --- a/source/blender/freestyle/intern/geometry/Bezier.cpp +++ b/source/blender/freestyle/intern/geometry/Bezier.cpp @@ -73,8 +73,8 @@ void BezierCurveSegment::Build() float increment = 1.0 / (float)nvertices; float t = 0.0f; for (int i = 0; i <= nvertices; ++i) { - _Vertices.push_back(Vec2d((x[3] + t * (x[2] + t * (x[1] + t * x[0]))), - (y[3] + t * (y[2] + t * (y[1] + t * y[0]))))); + _Vertices.emplace_back((x[3] + t * (x[2] + t * (x[1] + t * x[0]))), + (y[3] + t * (y[2] + t * (y[1] + t * y[0])))); t += increment; } } diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp index aeb4902e5b0..5682ccc9298 100644 --- a/source/blender/freestyle/intern/geometry/FitCurve.cpp +++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp @@ -493,7 +493,7 @@ void FitCurveWrapper::FitCurve(vector<Vec2d> &data, vector<Vec2d> &oCurve, doubl // copy results for (vector<Vector2>::iterator v = _vertices.begin(), vend = _vertices.end(); v != vend; ++v) { - oCurve.push_back(Vec2d(v->x(), v->y())); + oCurve.emplace_back(v->x(), v->y()); } } diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp index 76e63764e4d..b1d0a6c7e2a 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp @@ -54,8 +54,7 @@ void GeomCleaner::SortIndexedVertexArray(const float *iVertices, list<IndexedVertex> indexedVertices; unsigned i; for (i = 0; i < iVSize; i += 3) { - indexedVertices.push_back( - IndexedVertex(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]), i / 3)); + indexedVertices.emplace_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]), i / 3); } // q-sort @@ -99,7 +98,7 @@ void GeomCleaner::CompressIndexedVertexArray(const float *iVertices, vector<Vec3f> vertices; unsigned i; for (i = 0; i < iVSize; i += 3) { - vertices.push_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2])); + vertices.emplace_back(iVertices[i], iVertices[i + 1], iVertices[i + 2]); } unsigned *mapVertex = new unsigned[iVSize]; @@ -207,7 +206,7 @@ void GeomCleaner::CleanIndexedVertexArray(const float *iVertices, vector<Vec3f> vertices; unsigned i; for (i = 0; i < iVSize; i += 3) { - vertices.push_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2])); + vertices.emplace_back(iVertices[i], iVertices[i + 1], iVertices[i + 2]); } cleanHashTable ht; |