[Scummvm-devel] ScummVM binary size comparison

Robin Watts scummvm at wss.co.uk
Thu Nov 13 15:02:29 CET 2008

In message <e4eb41060811122108w5f52e238w25aaa1247becead6 at mail.gmail.com>
          "Rafał Rzepecki" <divided.mind at gmail.com> wrote:
> Another solution would be to replace the declaration
> void debug(int level, char *message, ...); // or whatever it is
> with
> void debug(int level, char *message, ...); // or whatever it is
> #else
> inline void debug(int level, char *message, ...) { }
> #endif
> I would be terrified to find an otherwise useful compiler that
> would not optimize this out trivially. This implies that the code
> does essentially the same thing, but it is a drop-in replacement;
> IMHO it is also much more elegant.

IME, lots of compilers ignore "inline" declarations. You should
prepare yourself to be terrified on a regular basis if you ever have
to use a wide range of compilers :)

I'd vote for the macroised version.

Robin Watts,             Email: <mailto:Robin.Watts at wss.co.uk>
Warm Silence Software,   WWW:   <http://www.wss.co.uk/>
P.O.Box 28, Woodstock,   Tel:   01608 737172 (or Mobile: 07885 487642)
Oxfordshire, OX20 1XX    Fax:   01608 737172

More information about the Scummvm-devel mailing list