Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-11-06 16:06:52 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-06 16:06:52 +0300
commit8d5073345d7e3f66d08e2f5587c8ad8cc1d812fa (patch)
treed3708a4dd5aa0cce4c7f75123e8a5597b638d0da /source/blender/io
parentcee5a415185c22aadfbeeee24b887b0ca729ad5a (diff)
Cleanup: Clang-Tidy, modernize-use-emplace
Diffstat (limited to 'source/blender/io')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc12
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.cc4
-rw-r--r--source/blender/io/alembic/intern/abc_reader_nurbs.cc4
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index 072feb2a90a..b70c835215d 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -170,7 +170,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
float r_uv[2], mapfw[4], vec[3];
psys_interpolate_uvs(tface, face->v4, pa->fuv, r_uv);
- uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
+ uv_values.emplace_back(r_uv[0], r_uv[1]);
psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL);
@@ -203,7 +203,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
}
if (vtx[o] == num) {
- uv_values.push_back(Imath::V2f(tface->uv[o][0], tface->uv[o][1]));
+ uv_values.emplace_back(tface->uv[o][0], tface->uv[o][1]);
MVert *mv = mverts + vtx[o];
@@ -230,7 +230,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
mul_m4_v3(inv_mat, vert);
/* Convert Z-up to Y-up. */
- verts.push_back(Imath::V3f(vert[0], vert[2], -vert[1]));
+ verts.emplace_back(vert[0], vert[2], -vert[1]);
}
}
}
@@ -277,12 +277,12 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
float r_uv[2], tmpnor[3], mapfw[4], vec[3];
psys_interpolate_uvs(tface, face->v4, pc->fuv, r_uv);
- uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
+ uv_values.emplace_back(r_uv[0], r_uv[1]);
psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL);
/* Convert Z-up to Y-up. */
- norm_values.push_back(Imath::V3f(tmpnor[0], tmpnor[2], -tmpnor[1]));
+ norm_values.emplace_back(tmpnor[0], tmpnor[2], -tmpnor[1]);
}
else {
if (!uv_values.empty()) {
@@ -302,7 +302,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
mul_m4_v3(inv_mat, vert);
/* Convert Z-up to Y-up. */
- verts.push_back(Imath::V3f(vert[0], vert[2], -vert[1]));
+ verts.emplace_back(vert[0], vert[2], -vert[1]);
path++;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc
index 557f580e8aa..eb5e51b5674 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_points.cc
@@ -123,8 +123,8 @@ void ABCPointsWriter::do_write(HierarchyContext &context)
sub_v3_v3v3(vel, state.co, psys->particles[p].prev_state.co);
/* Convert Z-up to Y-up. */
- points.push_back(Imath::V3f(pos[0], pos[2], -pos[1]));
- velocities.push_back(Imath::V3f(vel[0], vel[2], -vel[1]));
+ points.emplace_back(pos[0], pos[2], -pos[1]);
+ velocities.emplace_back(vel[0], vel[2], -vel[1]);
widths.push_back(psys->particles[p].size);
ids.push_back(index++);
}
diff --git a/source/blender/io/alembic/intern/abc_reader_nurbs.cc b/source/blender/io/alembic/intern/abc_reader_nurbs.cc
index 27d4ec44a27..2a5f4ecb787 100644
--- a/source/blender/io/alembic/intern/abc_reader_nurbs.cc
+++ b/source/blender/io/alembic/intern/abc_reader_nurbs.cc
@@ -197,7 +197,7 @@ void AbcNurbsReader::getNurbsPatches(const IObject &obj)
if (num_children == 0) {
INuPatch abc_nurb(obj, kWrapExisting);
INuPatchSchema schem = abc_nurb.getSchema();
- m_schemas.push_back(std::pair<INuPatchSchema, IObject>(schem, obj));
+ m_schemas.emplace_back(schem, obj);
return;
}
@@ -218,7 +218,7 @@ void AbcNurbsReader::getNurbsPatches(const IObject &obj)
if (INuPatch::matches(md) && ok) {
INuPatch abc_nurb(child, kWrapExisting);
INuPatchSchema schem = abc_nurb.getSchema();
- m_schemas.push_back(std::pair<INuPatchSchema, IObject>(schem, child));
+ m_schemas.emplace_back(schem, child);
}
getNurbsPatches(child);