refs #8752. Cpp check issue around if.
Merge branch 'feature/8752_fix_cpp_check_issue' into develop