From 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 Sep 2019 00:12:26 +1000 Subject: Cleanup: use post increment/decrement When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender). --- source/blender/alembic/intern/abc_nurbs.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/alembic/intern/abc_nurbs.cc') diff --git a/source/blender/alembic/intern/abc_nurbs.cc b/source/blender/alembic/intern/abc_nurbs.cc index c78cc4570c9..f2d0a9f1e16 100644 --- a/source/blender/alembic/intern/abc_nurbs.cc +++ b/source/blender/alembic/intern/abc_nurbs.cc @@ -74,7 +74,7 @@ AbcNurbsWriter::AbcNurbsWriter(Object *ob, Curve *curve = static_cast(m_object->data); size_t numNurbs = BLI_listbase_count(&curve->nurb); - for (size_t i = 0; i < numNurbs; ++i) { + for (size_t i = 0; i < numNurbs; i++) { std::stringstream str; str << m_name << '_' << i; @@ -106,7 +106,7 @@ static void get_knots(std::vector &knots, const int num_knots, float *nu_ knots.push_back(0.0f); - for (int i = 0; i < num_knots; ++i) { + for (int i = 0; i < num_knots; i++) { knots.push_back(nu_knots[i]); } @@ -136,7 +136,7 @@ void AbcNurbsWriter::do_write() } size_t count = 0; - for (Nurb *nu = static_cast(nulb->first); nu; nu = nu->next, ++count) { + for (Nurb *nu = static_cast(nulb->first); nu; nu = nu->next, count++) { std::vector knotsU; get_knots(knotsU, KNOTSU(nu), nu->knotsu); @@ -149,7 +149,7 @@ void AbcNurbsWriter::do_write() const BPoint *bp = nu->bp; - for (int i = 0; i < size; ++i, ++bp) { + for (int i = 0; i < size; i++, bp++) { copy_yup_from_zup(positions[i].getValue(), bp->vec); weights[i] = bp->vec[3]; } @@ -208,7 +208,7 @@ bool AbcNurbsReader::valid() const } std::vector>::const_iterator it; - for (it = m_schemas.begin(); it != m_schemas.end(); ++it) { + for (it = m_schemas.begin(); it != m_schemas.end(); it++) { const INuPatchSchema &schema = it->first; if (!schema.valid()) { @@ -229,7 +229,7 @@ static bool set_knots(const FloatArraySamplePtr &knots, float *&nu_knots) const size_t num_knots = knots->size() - 2; nu_knots = static_cast(MEM_callocN(num_knots * sizeof(float), "abc_setsplineknotsu")); - for (size_t i = 0; i < num_knots; ++i) { + for (size_t i = 0; i < num_knots; i++) { nu_knots[i] = (*knots)[i + 1]; } @@ -243,7 +243,7 @@ void AbcNurbsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele std::vector>::iterator it; - for (it = m_schemas.begin(); it != m_schemas.end(); ++it) { + for (it = m_schemas.begin(); it != m_schemas.end(); it++) { Nurb *nu = static_cast(MEM_callocN(sizeof(Nurb), "abc_getnurb")); nu->flag = CU_SMOOTH; nu->type = CU_NURBS; @@ -281,7 +281,7 @@ void AbcNurbsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele BPoint *bp = nu->bp; float posw_in = 1.0f; - for (int i = 0; i < num_points; ++i, ++bp) { + for (int i = 0; i < num_points; i++, bp++) { const Imath::V3f &pos_in = (*positions)[i]; if (weights) { @@ -349,7 +349,7 @@ void AbcNurbsReader::getNurbsPatches(const IObject &obj) return; } - for (int i = 0; i < num_children; ++i) { + for (int i = 0; i < num_children; i++) { bool ok = true; IObject child(obj, obj.getChildHeader(i).getName()); -- cgit v1.2.3