RE: [GD-Windows] Strict ANSI and <windows.h>
Brought to you by:
vexxed72
From: Grills, J. <jg...@so...> - 2002-11-04 03:28:30
|
Excellent! This works exactly as I desire. No compile warnings, and in the release build the disassembly doesn't show any sign of the if(False()){} at all. Time to go throw this in the header file that's always included, rebuild, and see how it works for the whole project. Thank you very much. j -----Original Message----- From: Pierre Terdiman [mailto:p.t...@wa...] Sent: Sunday, November 03, 2002 5:04 PM To: Grills, Jeff; 'Jon Watte'; gam...@li... Subject: Re: [GD-Windows] Strict ANSI and <windows.h> > My complaint about this technique is that I then have to disable warning > C4127: conditional expression is constant, something I'm not willing to do. > Anyone have a solution for that, but has no runtime impact? Maybe something like this : inline bool False(){ return false; } #define for if(False()){} else for You can also use a global extern variable instead of the inline function. You can also use this in Debug builds only, if you fear it adds a "runtime impact". Pierre |