|
32 | 32 |
|
33 | 33 | #define SERIALIZER() OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(_serializerMutex) |
34 | 34 |
|
| 35 | +#if __cplusplus > 199711L |
| 36 | + #define smart_ptr std::unique_ptr |
| 37 | +#else |
| 38 | + #define smart_prt std::auto_ptr |
| 39 | +#endif |
35 | 40 |
|
36 | 41 | osgDB::ReaderWriter::ReadResult |
37 | 42 | ReaderWriterDAE::readNode(std::istream& fin, |
@@ -73,7 +78,7 @@ ReaderWriterDAE::readNode(std::istream& fin, |
73 | 78 | #endif |
74 | 79 | } |
75 | 80 |
|
76 | | - std::auto_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
| 81 | + smart_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
77 | 82 |
|
78 | 83 | osgDAE::daeReader daeReader(pDAE, &pluginOptions); |
79 | 84 |
|
@@ -150,7 +155,8 @@ ReaderWriterDAE::readNode(const std::string& fname, |
150 | 155 | pDAE = new DAE; |
151 | 156 | #endif |
152 | 157 | } |
153 | | - std::auto_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
| 158 | + |
| 159 | + smart_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
154 | 160 |
|
155 | 161 | osgDAE::daeReader daeReader(pDAE, &pluginOptions); |
156 | 162 |
|
@@ -247,7 +253,7 @@ ReaderWriterDAE::writeNode( const osg::Node& node, |
247 | 253 | pDAE = new DAE; |
248 | 254 | #endif |
249 | 255 | } |
250 | | - std::auto_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
| 256 | + smart_ptr<DAE> scopedDae(bOwnDAE ? pDAE : NULL); // Deallocates locally created structure at scope exit |
251 | 257 |
|
252 | 258 | // Convert file name to URI |
253 | 259 | std::string fileURI = ConvertFilePathToColladaCompatibleURI(fname); |
|
0 commit comments