Revert "refs #8752. Cpp check issue around if."

This reverts commit 5b9a7123ccdc0031afe37551cf187f2edd49129c.
Merge branch 'feature/8752_fix_cpp_check_issue' into develop