include/osg/Callback: nullptr -> NULL
Fixes travis, which explictly requires c++98
This commit is contained in:
parent
417f78ac5e
commit
0161b8ab46
@ -121,6 +121,32 @@ class OSG_EXPORT Callback : public virtual Object {
|
||||
}
|
||||
}
|
||||
|
||||
/** Convenience method to find a nested callback by type. */
|
||||
template <typename T>
|
||||
static T* findNestedCallback(osg::Callback* callback)
|
||||
{
|
||||
if (!callback)
|
||||
return NULL;
|
||||
|
||||
if (T* cb = dynamic_cast<T*>(callback))
|
||||
return cb;
|
||||
|
||||
return findNestedCallback<T>(callback->getNestedCallback());
|
||||
}
|
||||
|
||||
/** Convenience method to find a nested callback by type. */
|
||||
template <typename T>
|
||||
static const T* findNestedCallback(const osg::Callback* callback)
|
||||
{
|
||||
if (!callback)
|
||||
return NULL;
|
||||
|
||||
if (const T* cb = dynamic_cast<const T*>(callback))
|
||||
return cb;
|
||||
|
||||
return findNestedCallback<T>(callback->getNestedCallback());
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~Callback() {}
|
||||
|
Loading…
Reference in New Issue
Block a user