summaryrefslogtreecommitdiff
path: root/src/wx/screens_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
commit5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch)
tree769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/wx/screens_panel.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'src/wx/screens_panel.cc')
-rw-r--r--src/wx/screens_panel.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc
index 0638763fe..df07a08c4 100644
--- a/src/wx/screens_panel.cc
+++ b/src/wx/screens_panel.cc
@@ -26,6 +26,7 @@
#include "cinema_dialog.h"
#include "screen_dialog.h"
#include <boost/foreach.hpp>
+#include <boost/make_shared.hpp>
using std::list;
using std::pair;
@@ -34,6 +35,7 @@ using std::map;
using std::string;
using std::make_pair;
using boost::shared_ptr;
+using boost::make_shared;
using boost::optional;
ScreensPanel::ScreensPanel (wxWindow* parent)
@@ -149,7 +151,7 @@ ScreensPanel::add_cinema_clicked ()
{
CinemaDialog* d = new CinemaDialog (this, _("Add Cinema"));
if (d->ShowModal () == wxID_OK) {
- shared_ptr<Cinema> c (new Cinema (d->name(), d->emails(), d->notes(), d->utc_offset_hour(), d->utc_offset_minute()));
+ shared_ptr<Cinema> c = boost::make_shared<Cinema> (d->name(), d->emails(), d->notes(), d->utc_offset_hour(), d->utc_offset_minute());
Config::instance()->add_cinema (c);
add_cinema (c);
}
@@ -208,7 +210,7 @@ ScreensPanel::add_screen_clicked ()
return;
}
- shared_ptr<Screen> s (new Screen (d->name(), d->recipient(), d->trusted_devices()));
+ shared_ptr<Screen> s = boost::make_shared<Screen> (d->name(), d->recipient(), d->trusted_devices());
c->add_screen (s);
optional<wxTreeItemId> id = add_screen (c, s);
if (id) {