HI JS,

The void objectDeleted(void*) method is inherited from osg::Observer,
so it's odd that the compiler would complain that it's unreferenced.
Perhaps VS2008 requires this templated implementation to be declared
virtual as well.  Could you try changing:

template<typename T>
struct WeakReference : public Observer, public Referenced
{
    WeakReference(const T* ptr) : _ptr(const_cast<T*>(ptr)) {}

    void objectDeleted(void*);
}

To:

template<typename T>
struct WeakReference : public Observer, public Referenced
{
    WeakReference(const T* ptr) : _ptr(const_cast<T*>(ptr)) {}

    virtual void objectDeleted(void*);
}


To see if that quietens down the compilers and stops it from
discarding the implementation.

Thanks,
Robert.

On Mon, May 17, 2010 at 3:20 PM, Jean-Sébastien Guay
<[email protected]> wrote:
> Hi Robert,
>
> After updating now that you've moved the <windows.h> header back up in
> GLExtensions, I'm getting this recurrent warning when compiling (VS2008 32
> bit build on Windows 7 x64)
>
> 3>C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\include\osg/observer_ptr(33) :
> warning C4505: 'osg::WeakReference<T>::objectDeleted' : unreferenced local
> function has been removed
> 3>        with
> 3>        [
> 3>            T=osgDB::DatabasePager
> 3>        ]
>
> This warning is printed for almost every file compiled. I'm not exactly sure
> what it means.
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to