CanvasRenderer: Revise for-loop using ranged-based