From 668265fb608430bf968044404ba70f45a0d56033 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Dec 2019 19:31:32 -0500 Subject: Use std::shared_ptr --- src/Driver.hpp | 1 - src/JackDbusDriver.hpp | 1 - src/Patchage.cpp | 2 +- src/Patchage.hpp | 7 +++---- src/PatchagePort.hpp | 2 -- 5 files changed, 4 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Driver.hpp b/src/Driver.hpp index 3837382..5c175a1 100644 --- a/src/Driver.hpp +++ b/src/Driver.hpp @@ -17,7 +17,6 @@ #ifndef PATCHAGE_DRIVER_HPP #define PATCHAGE_DRIVER_HPP -#include #include #include "PatchageEvent.hpp" diff --git a/src/JackDbusDriver.hpp b/src/JackDbusDriver.hpp index 69cc0a5..d6c39dd 100644 --- a/src/JackDbusDriver.hpp +++ b/src/JackDbusDriver.hpp @@ -18,7 +18,6 @@ #define PATCHAGE_JACKDBUSDRIVER_HPP #include -#include #include #include #include diff --git a/src/Patchage.cpp b/src/Patchage.cpp index eae2ef9..7875bb9 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -171,7 +171,7 @@ Patchage::Patchage(int argc, char** argv) #endif { _conf = new Configuration(); - _canvas = boost::shared_ptr(new PatchageCanvas(this, 1600*2, 1200*2)); + _canvas = std::make_shared(this, 1600*2, 1200*2); while (argc > 0) { if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help")) { diff --git a/src/Patchage.hpp b/src/Patchage.hpp index cf550f0..74826a0 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -19,8 +19,7 @@ #include #include - -#include +#include #include #include @@ -59,7 +58,7 @@ public: Patchage(int argc, char** argv); ~Patchage(); - const boost::shared_ptr& canvas() const { return _canvas; } + const std::shared_ptr& canvas() const { return _canvas; } Gtk::Window* window() { return _main_win.get(); } @@ -146,7 +145,7 @@ protected: void save_session(bool close); #endif - boost::shared_ptr _canvas; + std::shared_ptr _canvas; JackDriver* _jack_driver; Configuration* _conf; diff --git a/src/PatchagePort.hpp b/src/PatchagePort.hpp index d5d6cb3..f4921c8 100644 --- a/src/PatchagePort.hpp +++ b/src/PatchagePort.hpp @@ -19,8 +19,6 @@ #include -#include - #include #include -- cgit v1.2.1