mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:19:41 +00:00
Accept a const Object in UnrefQueue
This commit is contained in:
parent
3552b3a82c
commit
afe533e670
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ namespace SceneUtil
|
||||||
class UnrefWorkItem : public SceneUtil::WorkItem
|
class UnrefWorkItem : public SceneUtil::WorkItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::deque<osg::ref_ptr<osg::Object> > mObjects;
|
std::deque<osg::ref_ptr<const osg::Object> > mObjects;
|
||||||
|
|
||||||
virtual void doWork()
|
virtual void doWork()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ namespace SceneUtil
|
||||||
mWorkItem = new UnrefWorkItem;
|
mWorkItem = new UnrefWorkItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnrefQueue::push(osg::Object *obj)
|
void UnrefQueue::push(const osg::Object *obj)
|
||||||
{
|
{
|
||||||
mWorkItem->mObjects.push_back(obj);
|
mWorkItem->mObjects.push_back(obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace SceneUtil
|
||||||
UnrefQueue();
|
UnrefQueue();
|
||||||
|
|
||||||
/// Adds an object to the list of objects to be unreferenced. Call from the main thread.
|
/// 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.
|
/// 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.
|
/// Call from the main thread.
|
||||||
|
|
Loading…
Reference in a new issue