[glom] Document: Use unique_ptr<> instead of Glib::ScopedPtr<>.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Document: Use unique_ptr<> instead of Glib::ScopedPtr<>.
- Date: Wed, 6 Jan 2016 15:59:01 +0000 (UTC)
commit 695eef66b86b2223b5326342433a879f3e54605a
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jan 6 16:47:10 2016 +0100
Document: Use unique_ptr<> instead of Glib::ScopedPtr<>.
And new instead of g_malloc.
glom/libglom/document/document.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index a1e61d8..a3f9d3a 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -4981,7 +4981,7 @@ void read_archive_entry_file_contents(archive* a, archive_entry* entry, std::str
file_contents.clear();
const auto size = archive_entry_size(entry);
- const Glib::ScopedPtr<char> buf ((char*) g_malloc(size + 1));
+ const std::unique_ptr<char[]> buf(new char[size + 1]);
const auto r = archive_read_data(a, buf.get(), size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]