Simple style fixes.

* Use a range loop.
* Move simple continue checks earlier.
* clang-format.