[gnote] Create Note using std::make_shared
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Create Note using std::make_shared
- Date: Mon, 23 Dec 2019 16:40:55 +0000 (UTC)
commit 17864fd95ba7403c91cbcdaffddcb343d40911e3
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Dec 23 18:30:44 2019 +0200
Create Note using std::make_shared
src/note.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/note.cpp b/src/note.cpp
index 384601a2..2011570c 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -281,7 +281,7 @@ namespace gnote {
note_data->create_date() = date;
note_data->set_change_date(date);
- return Note::Ptr(new Note(std::move(note_data), filename, manager, g));
+ return std::make_shared<Note>(std::move(note_data), filename, manager, g);
}
Note::Ptr Note::create_existing_note(std::unique_ptr<NoteData> data, Glib::ustring filepath, NoteManager &
manager, IGnote & g)
@@ -299,7 +299,7 @@ namespace gnote {
data->create_date() = d;
}
}
- return Note::Ptr(new Note(std::move(data), filepath, manager, g));
+ return std::make_shared<Note>(std::move(data), filepath, manager, g);
}
void Note::delete_note()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]