Replace auto_ptr with unique_ptr
This commit is contained in:
parent
b767a33f84
commit
7ed4a5162e
11 changed files with 18 additions and 14 deletions
|
@ -7,6 +7,7 @@ set(SP_FDM_SOURCES
|
|||
SP/Balloon.cxx
|
||||
SP/BalloonSim.cpp
|
||||
SP/MagicCarpet.cxx
|
||||
SP/AISim.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <FDM/SP/ACMS.hxx>
|
||||
#include <FDM/SP/MagicCarpet.hxx>
|
||||
#include <FDM/SP/Balloon.h>
|
||||
#include <FDM/SP/AISim.hpp>
|
||||
#endif
|
||||
#include <FDM/ExternalNet/ExternalNet.hxx>
|
||||
#include <FDM/ExternalPipe/ExternalPipe.hxx>
|
||||
|
@ -319,9 +320,11 @@ void FDMShell::createImplementation()
|
|||
_impl = new FGBalloonSim( dt );
|
||||
} else if ( model == "magic" ) {
|
||||
_impl = new FGMagicCarpet( dt );
|
||||
// } else if ( model == "aisim" ) {
|
||||
// _impl = new FGAISim( dt );
|
||||
}
|
||||
#else
|
||||
else if (( model == "ada" )||(model == "acms")||( model == "balloon" )||( model == "magic" ))
|
||||
else if (( model == "ada" )||(model == "acms")||( model == "balloon" )||( model == "magic" )||( model == "aisim" ))
|
||||
{
|
||||
fdmUnavailable = true;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
virtual void close();
|
||||
private:
|
||||
class CocoaFileDialogPrivate;
|
||||
std::auto_ptr<CocoaFileDialogPrivate> d;
|
||||
std::unique_ptr<CocoaFileDialogPrivate> d;
|
||||
};
|
||||
|
||||
#endif // FG_COCOA_FILE_DIALOG_HXX
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef FG_GUI_COCOA_MOUSE_CURSOR_HXX
|
||||
#define FG_GUI_COCOA_MOUSE_CURSOR_HXX
|
||||
|
||||
#include <memory> // for auto_ptr
|
||||
#include <memory> // for unique_ptr
|
||||
|
||||
#include "MouseCursor.hxx"
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
private:
|
||||
class CocoaMouseCursorPrivate;
|
||||
std::auto_ptr<CocoaMouseCursorPrivate> d;
|
||||
std::unique_ptr<CocoaMouseCursorPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
|
||||
class CocoaMenuBarPrivate;
|
||||
private:
|
||||
std::auto_ptr<CocoaMenuBarPrivate> p;
|
||||
std::unique_ptr<CocoaMenuBarPrivate> p;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
// FGFontCache class.
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static std::auto_ptr<FGFontCache> global_fontCacheInstance;
|
||||
static std::unique_ptr<FGFontCache> global_fontCacheInstance;
|
||||
|
||||
|
||||
extern puFont FONT_HELVETICA_14;
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
|
||||
class WindowsMenuBarPrivate;
|
||||
private:
|
||||
std::auto_ptr<WindowsMenuBarPrivate> p;
|
||||
std::unique_ptr<WindowsMenuBarPrivate> p;
|
||||
};
|
||||
|
||||
#endif // __MENUBAR_HXX
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef FG_GUI_FILE_DIALOG_HXX
|
||||
#define FG_GUI_FILE_DIALOG_HXX 1
|
||||
|
||||
#include <memory> // for std::auto_ptr
|
||||
#include <memory> // for std::unique_ptr
|
||||
|
||||
#include <simgear/misc/strutils.hxx> // for string_list
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
@ -79,7 +79,7 @@ protected:
|
|||
string_list _filterPatterns;
|
||||
std::string _placeholder;
|
||||
bool _showHidden;
|
||||
std::auto_ptr<Callback> _callback;
|
||||
std::unique_ptr<Callback> _callback;
|
||||
};
|
||||
|
||||
#endif // FG_GUI_FILE_DIALOG_HXX
|
||||
|
|
|
@ -122,7 +122,7 @@ private:
|
|||
|
||||
QString m_extractDir;
|
||||
QStringList m_remainingPaths;
|
||||
std::auto_ptr<simgear::TarExtractor> m_untar;
|
||||
std::unique_ptr<simgear::TarExtractor> m_untar;
|
||||
bool m_error;
|
||||
quint64 m_totalBytes;
|
||||
quint64 m_bytesRead;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef FG_GUI_WINDOWS_MOUSE_CURSOR_HXX
|
||||
#define FG_GUI_WINDOWS_MOUSE_CURSOR_HXX
|
||||
|
||||
#include <memory> // for auto_ptr
|
||||
#include <memory> // for unique_ptr
|
||||
|
||||
#include "MouseCursor.hxx"
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
private:
|
||||
class WindowsMouseCursorPrivate;
|
||||
std::auto_ptr<WindowsMouseCursorPrivate> d;
|
||||
std::unique_ptr<WindowsMouseCursorPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory> // for auto_ptr on some systems
|
||||
#include <memory> // for unique_ptr on some systems
|
||||
#include <cstring> // for strcmp in lstr() (in this header, alas)
|
||||
|
||||
class FGMenuBar;
|
||||
|
@ -222,7 +222,7 @@ private:
|
|||
// Read all the configuration files in a directory.
|
||||
void readDir (const SGPath& path);
|
||||
|
||||
std::auto_ptr<FGMenuBar> _menubar;
|
||||
std::unique_ptr<FGMenuBar> _menubar;
|
||||
FGDialog * _active_dialog;
|
||||
typedef std::map<std::string,FGDialog *> DialogDict;
|
||||
DialogDict _active_dialogs;
|
||||
|
|
Loading…
Add table
Reference in a new issue