Re: [Plib-devel] Minor Issues with PLIB Release Candidate
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2005-01-15 17:45:42
|
Bram Stolk wrote: > Fay John F Contr AAC/WMG wrote: > >> - ssgSaveIV.cxx:100,233,240,246,255,270 - dynamic-cast used on >> polymorphic type with "/GR-"; behavior is unpredictable > > > I assume that "/GR-" is a flag for your win32 compiler? > What does this flag do? > Is removing this flag an option? > > If not, using isAKindOf() coupled with a static_cast<>() should > be a possible replacement of the dynamic cast. > > I find it strange that win32 is not able to cope with this. > I would guess that *all* base classes that have derived > classes are polymorphic. That means dynamic_cast cant be used > at all in your setup. I don't see why a dynamic cast is needed here. I'm going to dump it and use isAKindOf() and a static cast instead. These relatively new C++ features are always tricky - we should avoid them in software like PLIB where portability is a key feature. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |