Don’t condition on expressions known already at compile time to always evaluate to true (or false). Use assertions instead.
Note to reviewers:
- Some of these redundant checks might be indications of logical bugs in the existing code. If so they should be solved separately. Let me know if you spot such cases.
- Although these conditions are known to be true in some cases we might have good reasons for doing a redundant check for documentation purposes or other reasons. Let me know if you think so.
- Some of the assertions might be overkill since the preceding code trivially implies what we assert. The
fMasteris such a case.
Feedback welcome :-)