|
![](/i/fill.gif) |
In article <38a91600@news.povray.org>, Nieminen Juha
<war### [at] sarakerttunen cs tut fi> wrote:
> I noticed that most things are #defined as integer constant in the
> povray source code. For example:
...
> and so on.
>
> Perhaps it could be worth trying with an enum type instead? This way:
MegaPOV already uses an enum, look in pattern.h:
enum PATTERN_IDS
{
NO_PATTERN = 0,
PLAIN_PATTERN,
AVERAGE_PATTERN,
BITMAP_PATTERN,
...
> This also makes it easier to add new types (the numeration changes
> automatically as needed), so if nothing else, it's worth because of that.
It certainly does, having to renumber many of the entries just to add
one thing was quite annoying...
I think any possible speed increase would be heavily compiler dependant,
though.
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |