summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-09-26 12:49:48 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-09-26 22:04:37 (GMT)
commit65596031acaf7d4f277bd75758bb1c551501ce86 (patch)
treeaac3a8bf6dbdccc1d476225b50ba25decf1a46cc /Sluift
parent05fbe78f5c3b30517f7152b37c157a99120682dc (diff)
downloadswift-65596031acaf7d4f277bd75758bb1c551501ce86.zip
swift-65596031acaf7d4f277bd75758bb1c551501ce86.tar.bz2
Use const std::unique_ptr for pimpl idiom usage
All our pimpl idiom usage used std::shared_ptr due to being written in C++03. Now we use C++11 and const std::unique_ptr is more sensible. Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: I1b9b3fbb22e337d53ae71e5a5e03118998cc3376
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/ITunesInterface.h2
-rw-r--r--Sluift/ITunesInterface.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/Sluift/ITunesInterface.h b/Sluift/ITunesInterface.h
index a2cd06a..d09982b 100644
--- a/Sluift/ITunesInterface.h
+++ b/Sluift/ITunesInterface.h
@@ -35,6 +35,6 @@ namespace Swift {
private:
struct Private;
- std::shared_ptr<Private> p;
+ const std::unique_ptr<Private> p;
};
}
diff --git a/Sluift/ITunesInterface.mm b/Sluift/ITunesInterface.mm
index 7493d10..33cf1ca 100644
--- a/Sluift/ITunesInterface.mm
+++ b/Sluift/ITunesInterface.mm
@@ -25,7 +25,7 @@ struct ITunesInterface::Private {
iTunesApplication* iTunes;
};
-ITunesInterface::ITunesInterface() : p(std::make_shared<Private>()) {
+ITunesInterface::ITunesInterface() : p(new Private()) {
}
ITunesInterface::~ITunesInterface() {