From 33a5ca9a670b38a9edcc034b026e622a642c6f7f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 23 Jan 2019 05:34:37 +0100 Subject: Timestamp: Switch to std::shared_ptr. --- src/debug/timestamp.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/debug/timestamp.cpp') diff --git a/src/debug/timestamp.cpp b/src/debug/timestamp.cpp index e22f8dede..619c4a18a 100644 --- a/src/debug/timestamp.cpp +++ b/src/debug/timestamp.cpp @@ -13,6 +13,8 @@ #include #include +#include +#include #include "debug/simple-event.h" #include "timestamp.h" @@ -20,14 +22,13 @@ namespace Inkscape { namespace Debug { -Util::ptr_shared timestamp() { - Util::ptr_shared result; +std::shared_ptr timestamp() { GTimeVal timestamp; g_get_current_time(×tamp); gchar *value = g_strdup_printf( "%d.%06d", static_cast(timestamp.tv_sec), static_cast(timestamp.tv_usec) ); - result = Util::share_string(value); + std::shared_ptr result = std::make_shared(value); g_free(value); - return result; + return std::move(result); } } -- cgit v1.2.3