diff options
author | Sergey Sharybin <sergey@blender.org> | 2020-11-06 16:06:52 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2020-11-06 16:06:52 +0300 |
commit | 8d5073345d7e3f66d08e2f5587c8ad8cc1d812fa (patch) | |
tree | d3708a4dd5aa0cce4c7f75123e8a5597b638d0da /source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp | |
parent | cee5a415185c22aadfbeeee24b887b0ca729ad5a (diff) |
Cleanup: Clang-Tidy, modernize-use-emplace
Diffstat (limited to 'source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp')
-rw-r--r-- | source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index 0d4f21d9b11..af247851911 100644 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -384,13 +384,13 @@ int BezierCurveShader::shade(Stroke &stroke) const // Build the Bezier curve from this set of data points: vector<Vec2d> data; StrokeInternal::StrokeVertexIterator v = stroke.strokeVerticesBegin(), vend; - data.push_back(Vec2d(v->x(), v->y())); // first one + data.emplace_back(v->x(), v->y()); // first one StrokeInternal::StrokeVertexIterator previous = v; ++v; for (vend = stroke.strokeVerticesEnd(); v != vend; ++v) { if (!((fabs(v->x() - (previous)->x()) < M_EPSILON) && ((fabs(v->y() - (previous)->y()) < M_EPSILON)))) { - data.push_back(Vec2d(v->x(), v->y())); + data.emplace_back(v->x(), v->y()); } previous = v; } |