Accept a const Object in UnrefQueue

coverity_scan
scrawl 9 years ago
parent 3552b3a82c
commit afe533e670

@ -14,7 +14,7 @@ namespace SceneUtil
class UnrefWorkItem : public SceneUtil::WorkItem
{
public:
std::deque<osg::ref_ptr<osg::Object> > mObjects;
std::deque<osg::ref_ptr<const osg::Object> > mObjects;
virtual void doWork()
{
@ -30,7 +30,7 @@ namespace SceneUtil
mWorkItem = new UnrefWorkItem;
}
void UnrefQueue::push(osg::Object *obj)
void UnrefQueue::push(const osg::Object *obj)
{
mWorkItem->mObjects.push_back(obj);
}

@ -22,7 +22,7 @@ namespace SceneUtil
UnrefQueue();
/// Adds an object to the list of objects to be unreferenced. Call from the main thread.
void push(osg::Object* obj);
void push(const osg::Object* obj);
/// Adds a WorkItem to the given WorkQueue that will clear the list of objects in a worker thread, thus unreferencing them.
/// Call from the main thread.

Loading…
Cancel
Save