CppTools: Small refactoring

Change-Id: I8975af5fe80724ead81a88a38289fe16fbb283fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>