[MUD-Dev] Re: Question on c++ switch optimization, and parsers i

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Mon Feb 8 20:44:20 New Zealand Daylight Time 1999


[Ben Greear:]

 >> Instead of the array mapping to enums, why not map to funtion pointers?
 >
 >Cause all my methods have different signatures..

This is one of the few cases where I feel justified in using type-cheating
casts. The intent is clear, and it saves a whole lot of rigamarole. I
presume you can still do that in C++.

--
Don't design inefficiency in - it'll happen in the implementation. - me

Chris Gray     cg at ami-cg.GraySage.Edmonton.AB.CA
               http://www.GraySage.Edmonton.AB.CA/cg/




More information about the MUD-Dev mailing list