Changed DisplaySetting::instance() to return a ref_ptr<>& rathern than a raw C pointer to enable apps to delete the singleton or assign their own.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#define OSG_DisplaySettings 1
|
||||
|
||||
#include <osg/Referenced>
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -33,8 +34,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
public:
|
||||
|
||||
/** Maintain a DisplaySettings singleton for objects to query at runtime.*/
|
||||
static DisplaySettings* instance();
|
||||
|
||||
static ref_ptr<DisplaySettings>& instance();
|
||||
|
||||
DisplaySettings():
|
||||
Referenced(true)
|
||||
|
||||
Reference in New Issue
Block a user