Fix "same expression in both branches of ternary operator".
Fixes issue caught by cppcheck. Updating the code based on the comment which suggests the intention of the developer.
Fixes issue caught by cppcheck. Updating the code based on the comment which suggests the intention of the developer.