summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tobias.markmann@isode.com>2019-10-18 06:19:53 (GMT)
committerTobias Markmann <tobias.markmann@isode.com>2019-10-18 06:19:53 (GMT)
commit7de9a3489c3e2ddc4c0ab78f43649c5d6be20aca (patch)
treee0cfb4493ae07c3aa2270d3b94a1eb66ff4956dc /Swiften/IDN/PlatformIDNConverter.h
parent2239cdae45b39e675877ae32c86c47bcadce3090 (diff)
downloadswift-7de9a3489c3e2ddc4c0ab78f43649c5d6be20aca.zip
swift-7de9a3489c3e2ddc4c0ab78f43649c5d6be20aca.tar.bz2
Return unique_ptr in PlatformIDNConverter::create()
There are cases where users of this method forget to free the pointer. This is now avoided by returning a unique_ptr. Test-Information: All existing unit and integration tests, i.e. `./scons test=all` pass. Change-Id: I10a88c3361823074d81db7af8cec1bd70c409995
Diffstat (limited to 'Swiften/IDN/PlatformIDNConverter.h')
-rw-r--r--Swiften/IDN/PlatformIDNConverter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/IDN/PlatformIDNConverter.h b/Swiften/IDN/PlatformIDNConverter.h
index 704f7a7..3b9a275 100644
--- a/Swiften/IDN/PlatformIDNConverter.h
+++ b/Swiften/IDN/PlatformIDNConverter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,10 +8,12 @@
#include <Swiften/Base/API.h>
+#include <memory>
+
namespace Swift {
class IDNConverter;
namespace PlatformIDNConverter {
- SWIFTEN_API IDNConverter* create();
+ SWIFTEN_API std::unique_ptr<IDNConverter> create();
}
}