diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2019-01-23 04:34:37 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2019-01-24 17:08:27 +0000 |
| commit | 33a5ca9a670b38a9edcc034b026e622a642c6f7f (patch) | |
| tree | 2f2b62bd38c877c3e0597ac893c18761d3570a0c /src/debug/timestamp.cpp | |
| parent | Demangle: Switch to std::shared_ptr. (diff) | |
| download | inkscape-33a5ca9a670b38a9edcc034b026e622a642c6f7f.tar.gz inkscape-33a5ca9a670b38a9edcc034b026e622a642c6f7f.zip | |
Timestamp: Switch to std::shared_ptr.
Diffstat (limited to 'src/debug/timestamp.cpp')
| -rw-r--r-- | src/debug/timestamp.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 <glib.h> #include <glibmm/ustring.h> +#include <memory> +#include <string> #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<std::string> timestamp() { GTimeVal timestamp; g_get_current_time(×tamp); gchar *value = g_strdup_printf( "%d.%06d", static_cast<gint>(timestamp.tv_sec), static_cast<gint>(timestamp.tv_usec) ); - result = Util::share_string(value); + std::shared_ptr<std::string> result = std::make_shared<std::string>(value); g_free(value); - return result; + return std::move(result); } } |
