[gnote] Use std::make_shared
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Use std::make_shared
- Date: Thu, 26 Dec 2019 19:43:17 +0000 (UTC)
commit 925481ac7d86f190a03e6cd1add2060bb20040fa
Author: Aurimas Černius <aurisc4 gmail com>
Date: Thu Dec 26 20:45:22 2019 +0200
Use std::make_shared
src/noterenamedialog.cpp | 2 +-
src/search.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/noterenamedialog.cpp b/src/noterenamedialog.cpp
index f60b7625..7ab89089 100644
--- a/src/noterenamedialog.cpp
+++ b/src/noterenamedialog.cpp
@@ -275,7 +275,7 @@ NoteRenameDialog::NoteRenameDialog(const NoteBase::List & notes,
NoteRenameDialog::MapPtr NoteRenameDialog::get_notes() const
{
- const MapPtr notes(new std::map<NoteBase::Ptr, bool>);
+ const MapPtr notes(std::make_shared<std::map<NoteBase::Ptr, bool>>());
m_notes_model->foreach_iter(
sigc::bind(
diff --git a/src/search.cpp b/src/search.cpp
index ba7edd66..f78fc060 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -49,7 +49,7 @@ namespace gnote {
// Used for matching in the raw note XML
std::vector<Glib::ustring> encoded_words;
Search::split_watching_quotes(encoded_words, utils::XmlEncoder::encode(search_text));
- ResultsPtr temp_matches(new Results);
+ ResultsPtr temp_matches(std::make_shared<Results>());
// Skip over notes that are template notes
Tag::Ptr template_tag =
m_manager.tag_manager().get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SYSTEM_TAG);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]