enum vs const int

Lucas Goss lgoss007 at gmail.com
Tue Mar 21 16:03:57 PST 2006


Sean Kelly wrote:
> For header conversion, I agree with Don's suggestion that #defines 
> should be converted to auto declarations.  ie.

Hmm, I never thought about that, I must have missed that suggestion, but 
it makes sense.

> ... The executable size issue is a bit odd 
> though.  Perhaps the optimizer deals better with enums than with const 
> variables?

Yeah auto is the same way as const uint (both are 246.5K). The original 
without the import is 233.0K, so the enum is only 0.1K more. Oh and I 
don't know if it makes a difference but I didn't use any values from the 
imported file, I just put the import statement in and recompiled.



More information about the Digitalmars-d mailing list