mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 05:26:39 +00:00 
			
		
		
		
	This makes sure it's never erroneously optimized out. NodeIndexHolders don't need to be cloned as their record index is never supposed to be changed.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			679 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			679 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef OPENMW_COMPONENTS_NIFOSG_NODEINDEXHOLDER_H
 | 
						|
#define OPENMW_COMPONENTS_NIFOSG_NODEINDEXHOLDER_H
 | 
						|
 | 
						|
#include <osg/Object>
 | 
						|
 | 
						|
namespace NifOsg
 | 
						|
{
 | 
						|
 | 
						|
    class NodeIndexHolder : public osg::Object
 | 
						|
    {
 | 
						|
    public:
 | 
						|
        NodeIndexHolder() = default;
 | 
						|
        NodeIndexHolder(int index)
 | 
						|
            : mIndex(index)
 | 
						|
        {
 | 
						|
        }
 | 
						|
        NodeIndexHolder(const NodeIndexHolder& copy, const osg::CopyOp& copyop)
 | 
						|
            : Object(copy, copyop)
 | 
						|
            , mIndex(copy.mIndex)
 | 
						|
        {
 | 
						|
        }
 | 
						|
 | 
						|
        META_Object(NifOsg, NodeIndexHolder)
 | 
						|
 | 
						|
        int getIndex() const { return mIndex; }
 | 
						|
 | 
						|
    private:
 | 
						|
 | 
						|
        // NIF record index
 | 
						|
        int mIndex{0};
 | 
						|
    };
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
#endif
 |