aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
committerVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
commitf9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch)
tree2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/platform.cpp
parentPer-protocol include files. (diff)
downloadvmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz
vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip
Boost/C++11 shared pointers.
Diffstat (limited to 'src/platform.cpp')
-rw-r--r--src/platform.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/platform.cpp b/src/platform.cpp
index 37c7b027..631d5bcf 100644
--- a/src/platform.cpp
+++ b/src/platform.cpp
@@ -32,7 +32,7 @@ namespace vmime
{
-ref <platform::handler> platform::sm_handler = NULL;
+shared_ptr <platform::handler> platform::sm_handler;
platform::handler::~handler()
@@ -41,29 +41,29 @@ platform::handler::~handler()
// static
-ref <platform::handler> platform::getDefaultHandler()
+shared_ptr <platform::handler> platform::getDefaultHandler()
{
#if VMIME_PLATFORM_IS_WINDOWS
- return vmime::create <platforms::windows::windowsHandler>();
+ return make_shared <platforms::windows::windowsHandler>();
#elif VMIME_PLATFORM_IS_POSIX
- return vmime::create <platforms::posix::posixHandler>();
+ return make_shared <platforms::posix::posixHandler>();
#else
- return NULL;
+ return null;
#endif
}
// static
-ref <platform::handler> platform::getHandler()
+shared_ptr <platform::handler> platform::getHandler()
{
// If a custom platform handler is installed, return it
if (sm_handler)
return sm_handler;
// Else, use the default handler for this platform
- ref <handler> defaultHandler = getDefaultHandler();
+ shared_ptr <handler> defaultHandler = getDefaultHandler();
if (defaultHandler)
{