diff --git a/avogadro/core/angleiterator.cpp b/avogadro/core/angleiterator.cpp index 7ae09f43a9..b555ae0e37 100644 --- a/avogadro/core/angleiterator.cpp +++ b/avogadro/core/angleiterator.cpp @@ -16,7 +16,8 @@ using namespace std; AngleIterator::AngleIterator(const Molecule* mol) : m_current(0, 0, 0), m_mol(mol) -{} +{ +} Angle AngleIterator::begin() { @@ -49,9 +50,9 @@ Angle AngleIterator::operator++() return m_current; } - } // end "c" loop + } // end "c" loop valid = false; // we couldn't find a "c", so find a new "a" - } // end if() + } // end if() // can we find a new edge? for (const auto maybeA : graph.neighbors(b)) { @@ -66,13 +67,13 @@ Angle AngleIterator::operator++() // if we don't have a valid "a", move out to find a new "b" } while (valid); - while(!valid && b + 1 < count) { + while (!valid && b + 1 < count) { ++b; // try going to the next atom const auto neighbors = graph.neighbors(b); if (neighbors.size() < 2) continue; - + a = neighbors[0]; c = neighbors[0]; // we'll move to the next one in the loop valid = true; @@ -83,4 +84,4 @@ Angle AngleIterator::operator++() return make_tuple(MaxIndex, MaxIndex, MaxIndex); } // end ++ operator -} // namespace Avogadro +} // namespace Avogadro::Core