C++: Remove unused loop

Change-Id: I107c09bce86219476fab034b133b54f83170c17f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>