1
0
Fork 0

Replace boost::shared_ptr/weak_ptr by std::shared_ptr/weak_ptr

This commit is contained in:
gallaert 2020-04-19 12:05:55 +01:00 committed by James Turner
parent 381919451d
commit 0dfed0a096
4 changed files with 6 additions and 12 deletions

View file

@ -22,12 +22,8 @@
# include "config.h" # include "config.h"
#endif #endif
#include "FileDialog.hxx" #include "FileDialog.hxx"
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <simgear/nasal/cppbind/Ghost.hxx> #include <simgear/nasal/cppbind/Ghost.hxx>
#include <Main/globals.hxx> #include <Main/globals.hxx>
@ -137,7 +133,7 @@ void FGFileDialog::setCallbackFromNasal(const nasal::CallContext& ctx)
setCallback(new NasalCallback(func, object)); setCallback(new NasalCallback(func, object));
} }
typedef boost::shared_ptr<FGFileDialog> FileDialogPtr; typedef std::shared_ptr<FGFileDialog> FileDialogPtr;
typedef nasal::Ghost<FileDialogPtr> NasalFileDialog; typedef nasal::Ghost<FileDialogPtr> NasalFileDialog;
/** /**

View file

@ -31,6 +31,8 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <cassert>
class ClipboardX11: class ClipboardX11:
public NasalClipboard public NasalClipboard
{ {

View file

@ -20,7 +20,7 @@
#define NASAL_CLIPOARD_HXX_ #define NASAL_CLIPOARD_HXX_
#include <simgear/nasal/nasal.h> #include <simgear/nasal/nasal.h>
#include <boost/shared_ptr.hpp> #include <memory>
#include <string> #include <string>
class FGNasalSys; class FGNasalSys;
@ -39,7 +39,7 @@ class NasalClipboard
PRIMARY PRIMARY
}; };
typedef boost::shared_ptr<NasalClipboard> Ptr; typedef std::shared_ptr<NasalClipboard> Ptr;
virtual void update() {} virtual void update() {}
virtual std::string getText(Type type = CLIPBOARD) = 0; virtual std::string getText(Type type = CLIPBOARD) = 0;

View file

@ -25,14 +25,10 @@
#include <Main/util.hxx> #include <Main/util.hxx>
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <simgear/nasal/cppbind/NasalHash.hxx> #include <simgear/nasal/cppbind/NasalHash.hxx>
#include <simgear/nasal/cppbind/Ghost.hxx> #include <simgear/nasal/cppbind/Ghost.hxx>
typedef std::shared_ptr<SGPath> SGPathRef;
typedef boost::shared_ptr<SGPath> SGPathRef;
typedef nasal::Ghost<SGPathRef> NasalSGPath; typedef nasal::Ghost<SGPathRef> NasalSGPath;
SGPath::Permissions checkIORules(const SGPath& path) SGPath::Permissions checkIORules(const SGPath& path)