diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 20:31:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 21:08:10 +0300 |
commit | fd05f01be60128e70b7e53d566627c9e84b6a98d (patch) | |
tree | c49680b53d0a689e7a8766674e0bec3bc1207908 /source/blender/alembic/intern/abc_mesh.cc | |
parent | abeab4fcad6635e6932f5719918338414a20c726 (diff) |
Partially revert "Cleanup: use post increment/decrement"
This partially reverts commit 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0
Post increment can deep-copy for C++ iterators, while in my own checks
GCC was able to optimize this to get the same output,
better follow C++ best practice and use pre-increment for iterators.
Diffstat (limited to 'source/blender/alembic/intern/abc_mesh.cc')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 92de3547fd2..5de21075a23 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -525,7 +525,7 @@ template<typename Schema> void AbcGenericMeshWriter::writeFaceSets(struct Mesh * getGeoGroups(me, geo_groups); std::map<std::string, std::vector<int32_t>>::iterator it; - for (it = geo_groups.begin(); it != geo_groups.end(); it++) { + for (it = geo_groups.begin(); it != geo_groups.end(); ++it) { OFaceSet face_set = schema.createFaceSet(it->first); OFaceSetSchema::Sample samp; samp.setFaces(Int32ArraySample(it->second)); @@ -707,7 +707,7 @@ static void assign_materials(Main *bmain, std::map<std::string, int>::const_iterator it = mat_index_map.begin(); int matcount = 0; - for (; it != mat_index_map.end(); it++, matcount++) { + for (; it != mat_index_map.end(); ++it, matcount++) { if (!BKE_object_material_slot_add(bmain, ob)) { can_assign = false; break; @@ -723,7 +723,7 @@ static void assign_materials(Main *bmain, if (can_assign) { it = mat_index_map.begin(); - for (; it != mat_index_map.end(); it++) { + for (; it != mat_index_map.end(); ++it) { std::string mat_name = it->first; mat_iter = mat_map.find(mat_name.c_str()); |