6 ms·
> 2. No OS #ifdefs >Um;... so... like... what else to use instead?... You misread. The problem was that it was written in the form of if Windows do this, else
by cwyers 11y ago
> 2. No OS #ifdefs
>Um;... so... like... what else to use instead?...
You misread. The problem was that it was written in the form of if Windows do this, else do something that only works on OS X. The alternative is an explicit if for OS X, so that when you have a third OS to support you don't have to add that.
- akavel 11y agoHm, still not quite sure how that'd help; one still has to edit all that places, no? and in case one had "#else nothing", I don't see how that's more useful in any way. And the suggested "do something sensible by default" - if one could, one wouldn't have the ifdefs at all I suppose.
- Mathiasdm 11y agoOne possibility would be to have #else #error #endif If you work this way, you immediately know where to change your code.