mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Fix error: member access into incomplete type 'SceneUtil::UnrefWorkItem'
Fixes compile error encountered on OSX 10.9 with g++ sophie:build pineapple$ g++ --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin13.4.0 Thread model: posix The compilation error: [ 24%] Building CXX object apps/openmw/CMakeFiles/openmw.dir/mwrender/renderingmanager.cpp.o In file included from /Users/pineapple/git/openmw/apps/openmw/mwrender/renderingmanager.cpp:1: In file included from /Users/pineapple/git/openmw/apps/openmw/mwrender/renderingmanager.hpp:4: /Users/pineapple/git/openmw/openmw-deps/include/osg/ref_ptr:35:36: error: member access into incomplete type 'SceneUtil::UnrefWorkItem' ~ref_ptr() { if (_ptr) _ptr->unref(); _ptr = 0; } ^ /Users/pineapple/git/openmw/./components/sceneutil/unrefqueue.hpp:14:11: note: in instantiation of member function 'osg::ref_ptr<SceneUtil::UnrefWorkItem>::~ref_ptr' requested here class UnrefQueue : public osg::Referenced ^ /Users/pineapple/git/openmw/./components/sceneutil/unrefqueue.hpp:10:11: note: forward declaration of 'SceneUtil::UnrefWorkItem' class UnrefWorkItem;
This commit is contained in:
parent
b748bb11ae
commit
4dd9386c4f
2 changed files with 17 additions and 17 deletions
|
@ -1,28 +1,18 @@
|
||||||
#include "unrefqueue.hpp"
|
#include "unrefqueue.hpp"
|
||||||
|
|
||||||
#include <deque>
|
|
||||||
|
|
||||||
//#include <osg/Timer>
|
//#include <osg/Timer>
|
||||||
|
|
||||||
//#include <components/debug/debuglog.hpp>
|
//#include <components/debug/debuglog.hpp>
|
||||||
#include <components/sceneutil/workqueue.hpp>
|
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
|
void UnrefWorkItem::doWork()
|
||||||
class UnrefWorkItem : public SceneUtil::WorkItem
|
|
||||||
{
|
{
|
||||||
public:
|
//osg::Timer timer;
|
||||||
std::deque<osg::ref_ptr<const osg::Referenced> > mObjects;
|
//size_t objcount = mObjects.size();
|
||||||
|
mObjects.clear();
|
||||||
virtual void doWork()
|
//Log(Debug::Verbose) << "cleared " << objcount << " objects in " << timer.time_m();
|
||||||
{
|
}
|
||||||
//osg::Timer timer;
|
|
||||||
//size_t objcount = mObjects.size();
|
|
||||||
mObjects.clear();
|
|
||||||
//Log(Debug::Verbose) << "cleared " << objcount << " objects in " << timer.time_m();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
UnrefQueue::UnrefQueue()
|
UnrefQueue::UnrefQueue()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
#ifndef OPENMW_COMPONENTS_UNREFQUEUE_H
|
#ifndef OPENMW_COMPONENTS_UNREFQUEUE_H
|
||||||
#define OPENMW_COMPONENTS_UNREFQUEUE_H
|
#define OPENMW_COMPONENTS_UNREFQUEUE_H
|
||||||
|
|
||||||
|
#include <deque>
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
#include <osg/Referenced>
|
#include <osg/Referenced>
|
||||||
|
|
||||||
|
#include <components/sceneutil/workqueue.hpp>
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
class WorkQueue;
|
class WorkQueue;
|
||||||
class UnrefWorkItem;
|
|
||||||
|
class UnrefWorkItem : public SceneUtil::WorkItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::deque<osg::ref_ptr<const osg::Referenced> > mObjects;
|
||||||
|
virtual void doWork();
|
||||||
|
};
|
||||||
|
|
||||||
/// @brief Handles unreferencing of objects through the WorkQueue. Typical use scenario
|
/// @brief Handles unreferencing of objects through the WorkQueue. Typical use scenario
|
||||||
/// would be the main thread pushing objects that are no longer needed, and the background thread deleting them.
|
/// would be the main thread pushing objects that are no longer needed, and the background thread deleting them.
|
||||||
|
|
Loading…
Reference in a new issue