File tree 3 files changed +16
-5
lines changed
3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 32
32
33
33
#define SERIALIZER () OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock (_serializerMutex)
34
34
35
- #if __cplusplus > 199711L
35
+ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 199711L) || __cplusplus >= 199711L)
36
36
#define smart_ptr std::unique_ptr
37
37
#else
38
38
#define smart_ptr std::auto_ptr
Original file line number Diff line number Diff line change 10
10
11
11
#define STREAM_TIMEOUT_IN_SECONDS_TO_CONSIDER_IT_DEAD 10
12
12
13
+ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 199711L) || __cplusplus >= 199711L)
14
+ #define smart_ptr std::unique_ptr
15
+ #else
16
+ #define smart_ptr std::auto_ptr
17
+ #endif
13
18
14
19
namespace osgFFmpeg {
15
20
@@ -23,8 +28,8 @@ FFmpegImageStream::FFmpegImageStream() :
23
28
{
24
29
setOrigin (osg::Image::TOP_LEFT);
25
30
26
- std::auto_ptr <FFmpegDecoder> decoder (new FFmpegDecoder);
27
- std::auto_ptr <CommandQueue> commands (new CommandQueue);
31
+ smart_ptr <FFmpegDecoder> decoder (new FFmpegDecoder);
32
+ smart_ptr <CommandQueue> commands (new CommandQueue);
28
33
29
34
m_decoder = decoder.release ();
30
35
m_commands = commands.release ();
Original file line number Diff line number Diff line change 34
34
35
35
#define SERIALIZER () OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock (_serializerMutex)
36
36
37
+ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 199711L) || __cplusplus >= 199711L)
38
+ #define smart_ptr std::unique_ptr
39
+ #else
40
+ #define smart_ptr std::auto_ptr
41
+ #endif
42
+
37
43
// From easyrgb.com
38
44
float Hue_2_RGB ( float v1, float v2, float vH )
39
45
{
@@ -123,7 +129,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter
123
129
124
130
initGDAL ();
125
131
126
- std::auto_ptr <GDALDataset> dataset ((GDALDataset*)GDALOpen (fileName.c_str (),GA_ReadOnly));
132
+ smart_ptr <GDALDataset> dataset ((GDALDataset*)GDALOpen (fileName.c_str (),GA_ReadOnly));
127
133
if (!dataset.get ()) return ReadResult::FILE_NOT_HANDLED;
128
134
129
135
int dataWidth = dataset->GetRasterXSize ();
@@ -577,7 +583,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter
577
583
578
584
initGDAL ();
579
585
580
- std::auto_ptr <GDALDataset> dataset ((GDALDataset*)GDALOpen (fileName.c_str (),GA_ReadOnly));
586
+ smart_ptr <GDALDataset> dataset ((GDALDataset*)GDALOpen (fileName.c_str (),GA_ReadOnly));
581
587
if (!dataset.get ()) return ReadResult::FILE_NOT_HANDLED;
582
588
583
589
int dataWidth = dataset->GetRasterXSize ();
You can’t perform that action at this time.
0 commit comments