Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dynamic pointer cast in SkyDomeUpdateCallback #2

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Missing dynamic pointer cast in SkyDomeUpdateCallback #2

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Checkout and build current OpenSceneGraph (2014-08-20 16:15:36)
2. Checkout and try to build osgephemeris


What is the expected output? What do you see instead?
Compilation should work but error occurs:
osgEphemeris/src/osgEphemerisLib/SkyDome.cpp: In member function ‘void 
SkyDomeUpdateCallback::_callDrawableCallbacks(osg::Geode*, 
osg::NodeVisitor*)’:
osgEphemeris/src/osgEphemerisLib/SkyDome.cpp:71:92: error: invalid conversion 
from ‘osg::Callback*’ to ‘osg::Drawable::UpdateCallback*’ [-fpermissive]
                     osg::Drawable::UpdateCallback *updateCallback = dbl->getUpdateCallback();
                                                                                            ^
osgEphemeris/src/osgEphemerisLib/SkyDome.cpp:71:92: error: cannot convert from 
base ‘osg::Callback’ to derived type ‘osg::Drawable::UpdateCallback’ 
via virtual base ‘osg::Callback’


What version of the product are you using? On what operating system?
Current SVN Rev 33 on Debian Jessie. Compiled with g++ 4.8.3 and CMake 2.8.12.2.


Please provide any additional information below.
In SkyDome.cpp line 71 replace:
osg::Drawable::UpdateCallback *updateCallback = dbl->getUpdateCallback();

with

osg::Drawable::UpdateCallback *updateCallback = 
dynamic_cast<osg::Drawable::UpdateCallback*>(dbl->getUpdateCallback());

Original issue reported on code.google.com by [email protected] on 27 Aug 2014 at 1:05

aumuell added a commit to hlrs-vis/osgephemeris that referenced this issue Mar 30, 2016
fixes issue pmartz#2 imported from google code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant