Re: [Fwd: [Crystal-cvs] SF.net SVN: crystal:[38136] CS/branches/soc2012/editor]

Mat Sutcliffe <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <CACE5BzKVbz-8LR4V4jqKrpAw8RMiZBLcXa8BXcBDifXpEjVphg@mail.gmail.com>
On 8 June 2012 20:32, Andrei Bârsan <[email protected]> wrote:

> > The cleanest might be to use a switch but this may not be possible at
> all,
> > because the potential ID value's are not available at compilation time.
> >
> > Some other suggestions?
> >
> Would macros be too nasty?
>

Besides being nasty, I don't see how macros could offer any improvement
over if-else-if-else-if.

In terms of readability, I think you're unlikely to beat if-else-if-else-if.

In terms of efficiency, I can only speculate about a csHash of function
pointers or so. But in this case, readability seems much more important
than efficiency.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.