Re: RTTI in CS
Christian Van Brussel <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Organization | UCL - TELE |
| Message-ID | <1362490003.28433.10.camel@scylla> |
Thanks for this information. There are still a bunch of dynamic_cast<>s in the physics2 plugin, so the problem is still topical. I'll made some tests in release builds and try to find if there are some issues and/or things within the code that can be changed. Any additional feedback is welcome too, you can test the physics2 plugin in trunk by launching phystut2 then spawning some objects with the keys '1' to '6' (there are also more complex objects accessible with the keys 'F1' to 'F3'). On Mon, 2013-03-04 at 23:39 +0100, res wrote: > Uh, seems this went unanswered for a small while now... > Is my answer still relevant or did the real-world usage prove > dynamic_cast<>s generally work? ;p > > On 30.01.2013 14:36, Christian Van Brussel wrote: > > any idea of the status of the use of Run-Time Type Information in CS? > > > > The physics2 plugin uses currently a lot dynamic casts, and there are > > also some places here and there in CS where they are used, such as in > > the csparser and the software sound renderer. > > > > Does all those dynamic casts need to be removed or is it OK now? > > A dynamic_cast<> for an object from the same module (i.e. plugin) to a > type “defined“ in the same module should be fine. > dynamic_cast<>s across modules have potential for problems. > (dynamic_cast<> usually needs some extra data at runtime; but by casting > ”across modules” you may end up with issues like the instance from > module A might requiring some data not visible/available from module B. > Or perhaps something is found in module B... which is is actually the > wrong type information.) > > However, at least we used to disable RTTI in release builds... so I > recommend you test it there. > Depending on how extensively dynamic_cast<>s are used, it might be a > good idea to look for some feature in a demo program that would > certainly cause a code path using a dynamic_cast<> being utilized. > > If you can tell people to “start this app, press that key” we can more > quickly test if we're in the clear. > > -Frank > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > Crystal-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/crystal-develop ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Crystal-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-develop