From afe533e6709496131cd5f424cab3f9b1b538fc25 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 9 Feb 2016 19:00:30 +0100 Subject: [PATCH] Accept a const Object in UnrefQueue --- components/sceneutil/unrefqueue.cpp | 4 ++-- components/sceneutil/unrefqueue.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/sceneutil/unrefqueue.cpp b/components/sceneutil/unrefqueue.cpp index 0b65c4a32..a5eb1654e 100644 --- a/components/sceneutil/unrefqueue.cpp +++ b/components/sceneutil/unrefqueue.cpp @@ -14,7 +14,7 @@ namespace SceneUtil class UnrefWorkItem : public SceneUtil::WorkItem { public: - std::deque > mObjects; + std::deque > 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); } diff --git a/components/sceneutil/unrefqueue.hpp b/components/sceneutil/unrefqueue.hpp index d0bec061c..85b1d31e1 100644 --- a/components/sceneutil/unrefqueue.hpp +++ b/components/sceneutil/unrefqueue.hpp @@ -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.