diff options
Diffstat (limited to 'SwifTools/URIHandler')
-rw-r--r-- | SwifTools/URIHandler/MacOSXURIHandler.h | 6 | ||||
-rw-r--r-- | SwifTools/URIHandler/MacOSXURIHandler.mm | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/SwifTools/URIHandler/MacOSXURIHandler.h b/SwifTools/URIHandler/MacOSXURIHandler.h index afa4c6c..8136fa7 100644 --- a/SwifTools/URIHandler/MacOSXURIHandler.h +++ b/SwifTools/URIHandler/MacOSXURIHandler.h @@ -1,11 +1,13 @@ /* - * Copyright (c) 2011 Isode Limited. + * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <memory> + #include <SwifTools/URIHandler/URIHandler.h> namespace Swift { @@ -19,6 +21,6 @@ namespace Swift { private: class Private; - Private* p; + const std::unique_ptr<Private> p; }; } diff --git a/SwifTools/URIHandler/MacOSXURIHandler.mm b/SwifTools/URIHandler/MacOSXURIHandler.mm index 6285e12..ae7dc44 100644 --- a/SwifTools/URIHandler/MacOSXURIHandler.mm +++ b/SwifTools/URIHandler/MacOSXURIHandler.mm @@ -44,14 +44,12 @@ class MacOSXURIHandler::Private { MacOSXURIEventHandler* eventHandler; }; -MacOSXURIHandler::MacOSXURIHandler() { - p = new Private(); +MacOSXURIHandler::MacOSXURIHandler() : p(new Private()) { p->eventHandler = [[MacOSXURIEventHandler alloc] initWithHandler: this]; } MacOSXURIHandler::~MacOSXURIHandler() { [p->eventHandler release]; - delete p; } void MacOSXURIHandler::start() { |