Sure, the main thing I wanted to suggest is to do the refactoring in a different way, namely fully separate the two branches, one for assertions off and one for assertions on. It does not matter which preprocessor expression is used to distinguish the two.