Kurosu a écrit :
> This one seems rather nice (at least it confirms my belief it should be
> a template):
> http://www.gamedev.net/reference/programming/features/enginuity2/page5.asp

I'm not convinced the author wrote and maintained that much C++ code :

- the functors are pretty primitive : what about functors with 
arguments? (answer: not supported)  What happens if the stored pointer 
becomes invalid? (answer: segfault) ...

- the singleton tries to use a "cunning trick" which is probably very 
wrong ; I suggest having a look at the C++ FAQ lite to find better 
examples and explanations why they're not that good!

- the ring buffer looks pretty inelegant : why does it take a type and a 
size as template argument? I would have had a single template argument 
for the type and used a constructor from an existing normal buffer...

Snark

_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à