Simplify addCurveLineIntersections() code.
Fix indentation levels.