[gnote] Use std::static_pointer_cast with namespace



commit 70d72920693bcfcee745b1ba5ecd8a1cf4a2fef8
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Tue Apr 9 20:48:40 2019 +0300

    Use std::static_pointer_cast with namespace

 src/addins/backlinks/backlinksnoteaddin.cpp        |  2 +-
 src/addins/noteoftheday/noteoftheday.cpp           |  2 +-
 .../noteoftheday/noteofthedaypreferences.cpp       |  4 ++--
 src/dbus/remotecontrol.cpp                         |  8 ++++----
 src/dbus/searchprovider.cpp                        |  4 ++--
 src/note.cpp                                       |  4 ++--
 src/notebooks/notebook.cpp                         |  8 ++++----
 src/notebooks/notebookapplicationaddin.cpp         |  2 +-
 src/notebooks/notebookmanager.cpp                  |  4 ++--
 src/notebooks/notebookstreeview.cpp                |  4 ++--
 src/notebooks/specialnotebooks.cpp                 |  4 ++--
 src/notemanager.cpp                                | 10 +++++-----
 src/notemanagerbase.cpp                            |  4 ++--
 src/noterenamedialog.cpp                           |  6 +++---
 src/notewindow.cpp                                 |  6 +++---
 src/preferencesdialog.cpp                          |  4 ++--
 src/recentchanges.cpp                              |  2 +-
 src/search.cpp                                     |  2 +-
 src/searchnoteswidget.cpp                          | 12 ++++++------
 src/synchronization/syncdialog.cpp                 |  6 +++---
 src/synchronization/syncmanager.cpp                | 22 +++++++++++-----------
 src/watchers.cpp                                   |  4 ++--
 22 files changed, 62 insertions(+), 62 deletions(-)
---
diff --git a/src/addins/backlinks/backlinksnoteaddin.cpp b/src/addins/backlinks/backlinksnoteaddin.cpp
index ae695a20..870e4edb 100644
--- a/src/addins/backlinks/backlinksnoteaddin.cpp
+++ b/src/addins/backlinks/backlinksnoteaddin.cpp
@@ -65,7 +65,7 @@ void BacklinksNoteAddin::on_open_note(const Glib::VariantBase & param)
   Glib::ustring uri = Glib::VariantBase::cast_dynamic<Glib::Variant<Glib::ustring>>(param).get();
   gnote::NoteBase::Ptr note = get_note()->manager().find_by_uri(uri);
   if(note) {
-    gnote::MainWindow::present_in_new_window(static_pointer_cast<gnote::Note>(note),
+    gnote::MainWindow::present_in_new_window(std::static_pointer_cast<gnote::Note>(note),
       gnote::Preferences::obj().get_schema_settings(gnote::Preferences::SCHEMA_GNOTE)->
         get_boolean(gnote::Preferences::ENABLE_CLOSE_NOTE_ON_ESCAPE));
   }
diff --git a/src/addins/noteoftheday/noteoftheday.cpp b/src/addins/noteoftheday/noteoftheday.cpp
index 7b0b4eea..f949ac6b 100644
--- a/src/addins/noteoftheday/noteoftheday.cpp
+++ b/src/addins/noteoftheday/noteoftheday.cpp
@@ -169,7 +169,7 @@ bool NoteOfTheDay::has_changed(const gnote::NoteBase::Ptr & note)
                     date_time.year()),
                     *static_cast<gnote::NoteManager*>(&note->manager()));
 
-  return get_content_without_title(static_pointer_cast<gnote::Note>(note)->text_content())
+  return get_content_without_title(std::static_pointer_cast<gnote::Note>(note)->text_content())
            == get_content_without_title(
                 gnote::utils::XmlDecoder::decode(original_xml))
          ? false
diff --git a/src/addins/noteoftheday/noteofthedaypreferences.cpp 
b/src/addins/noteoftheday/noteofthedaypreferences.cpp
index 3432a765..792c9340 100644
--- a/src/addins/noteoftheday/noteofthedaypreferences.cpp
+++ b/src/addins/noteoftheday/noteofthedaypreferences.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2014 Aurimas Cernius
+ * Copyright (C) 2011-2014,2019 Aurimas Cernius
  * Copyright (C) 2009 Debarshi Ray
  *
  * This program is free software: you can redistribute it and/or modify
@@ -76,7 +76,7 @@ void NoteOfTheDayPreferences::open_template_button_clicked() const
   }
 
   if(0 != template_note) {
-    gnote::IGnote::obj().open_note(static_pointer_cast<gnote::Note>(template_note));
+    gnote::IGnote::obj().open_note(std::static_pointer_cast<gnote::Note>(template_note));
   }
 }
 
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 1b431312..c6c5ae66 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -204,7 +204,7 @@ namespace gnote {
     NoteBase::Ptr note = m_manager.find_by_uri(uri);
     if (!note)
       return "";
-    return static_pointer_cast<Note>(note)->text_content();
+    return std::static_pointer_cast<Note>(note)->text_content();
   }
 
 
@@ -258,7 +258,7 @@ bool RemoteControl::HideNote(const Glib::ustring& uri)
   if (!note)
     return false;
 
-  NoteWindow *window = static_pointer_cast<Note>(note)->get_window();
+  NoteWindow *window = std::static_pointer_cast<Note>(note)->get_window();
   if(window == NULL) {
     return true;
   }
@@ -343,7 +343,7 @@ bool RemoteControl::SetNoteContents(const Glib::ustring& uri,
     return false;
   }
 
-  static_pointer_cast<Note>(note)->set_text_content(text_contents);
+  std::static_pointer_cast<Note>(note)->set_text_content(text_contents);
   return true;
 }
 
@@ -393,7 +393,7 @@ void RemoteControl::on_note_saved(const NoteBase::Ptr & note)
 
 MainWindow & RemoteControl::present_note(const NoteBase::Ptr & note)
 {
-  return *MainWindow::present_default(static_pointer_cast<Note>(note));
+  return *MainWindow::present_default(std::static_pointer_cast<Note>(note));
 }
 
 
diff --git a/src/dbus/searchprovider.cpp b/src/dbus/searchprovider.cpp
index 8f706d61..59072a84 100644
--- a/src/dbus/searchprovider.cpp
+++ b/src/dbus/searchprovider.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2013-2014,2016 Aurimas Cernius
+ * Copyright (C) 2013-2014,2016,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -204,7 +204,7 @@ void SearchProvider::ActivateResult(const Glib::ustring & identifier,
 {
   gnote::NoteBase::Ptr note = m_manager.find_by_uri(identifier);
   if(note != 0) {
-    gnote::IGnote::obj().open_note(static_pointer_cast<gnote::Note>(note));
+    gnote::IGnote::obj().open_note(std::static_pointer_cast<gnote::Note>(note));
   }
 }
 
diff --git a/src/note.cpp b/src/note.cpp
index 90d7acdd..82c0d8ee 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -550,7 +550,7 @@ namespace gnote {
   void Note::process_rename_link_update(const Glib::ustring & old_title)
   {
     NoteBase::List linking_notes = manager().get_notes_linking_to(old_title);
-    const Note::Ptr self = static_pointer_cast<Note>(shared_from_this());
+    const Note::Ptr self = std::static_pointer_cast<Note>(shared_from_this());
 
     if (!linking_notes.empty()) {
       Glib::RefPtr<Gio::Settings> settings = 
Preferences::obj().get_schema_settings(Preferences::SCHEMA_GNOTE);
@@ -761,7 +761,7 @@ namespace gnote {
       m_note_window_embedded = true;
     }
 
-    
notebooks::NotebookManager::obj().active_notes_notebook()->add_note(static_pointer_cast<Note>(shared_from_this()));
+    
notebooks::NotebookManager::obj().active_notes_notebook()->add_note(std::static_pointer_cast<Note>(shared_from_this()));
   }
 
   void Note::on_note_window_foregrounded()
diff --git a/src/notebooks/notebook.cpp b/src/notebooks/notebook.cpp
index a5c5aafb..8d465183 100644
--- a/src/notebooks/notebook.cpp
+++ b/src/notebooks/notebook.cpp
@@ -135,7 +135,7 @@ namespace notebooks {
     templ_tag->get_notes(notes);
     for(NoteBase *n : notes) {
       if(n->contains_tag(notebook_tag)) {
-        note = static_pointer_cast<Note>(n->shared_from_this());
+        note = std::static_pointer_cast<Note>(n->shared_from_this());
         break;
       }
     }
@@ -157,7 +157,7 @@ namespace notebooks {
       note = m_note_manager.create(title, NoteManager::get_note_template_content (title));
           
       // Select the initial text
-      NoteBuffer::Ptr buffer = static_pointer_cast<Note>(note)->get_buffer();
+      NoteBuffer::Ptr buffer = std::static_pointer_cast<Note>(note)->get_buffer();
       buffer->select_note_body();
 
       // Flag this as a template note
@@ -173,7 +173,7 @@ namespace notebooks {
       note->queue_save (CONTENT_CHANGED);
     }
 
-    return static_pointer_cast<Note>(note);
+    return std::static_pointer_cast<Note>(note);
   }
 
   Note::Ptr Notebook::create_notebook_note()
@@ -187,7 +187,7 @@ namespace notebooks {
     // Add the notebook tag
     note->add_tag(m_tag);
 
-    return static_pointer_cast<Note>(note);
+    return std::static_pointer_cast<Note>(note);
   }
 
   /// <summary>
diff --git a/src/notebooks/notebookapplicationaddin.cpp b/src/notebooks/notebookapplicationaddin.cpp
index 360dde94..e26b753f 100644
--- a/src/notebooks/notebookapplicationaddin.cpp
+++ b/src/notebooks/notebookapplicationaddin.cpp
@@ -140,7 +140,7 @@ namespace gnote {
         return;
       }
 
-      NotebookManager::obj().signal_note_removed_from_notebook() (*static_pointer_cast<Note>(note), 
notebook);
+      NotebookManager::obj().signal_note_removed_from_notebook() (*std::static_pointer_cast<Note>(note), 
notebook);
     }
 
     void NotebookApplicationAddin::on_note_added(const NoteBase::Ptr & note)
diff --git a/src/notebooks/notebookmanager.cpp b/src/notebooks/notebookmanager.cpp
index f5205b2b..0c8ff166 100644
--- a/src/notebooks/notebookmanager.cpp
+++ b/src/notebooks/notebookmanager.cpp
@@ -72,7 +72,7 @@ namespace gnote {
 
      iter = m_notebooks->append();
      iter->set_value(0, m_active_notes);
-     static_pointer_cast<ActiveNotesNotebook>(m_active_notes)->signal_size_changed
+     std::static_pointer_cast<ActiveNotesNotebook>(m_active_notes)->signal_size_changed
        .connect(sigc::mem_fun(*this, &NotebookManager::on_active_notes_size_changed));
 
       
@@ -503,7 +503,7 @@ namespace gnote {
       Notebook::Ptr notebook;
       iter->get_value(0, notebook);
       if(notebook == m_active_notes) {
-        return !static_pointer_cast<ActiveNotesNotebook>(m_active_notes)->empty();
+        return !std::static_pointer_cast<ActiveNotesNotebook>(m_active_notes)->empty();
       }
 
       return true;
diff --git a/src/notebooks/notebookstreeview.cpp b/src/notebooks/notebookstreeview.cpp
index 6a438578..83a5bb91 100644
--- a/src/notebooks/notebookstreeview.cpp
+++ b/src/notebooks/notebookstreeview.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2014 Aurimas Cernius
+ * Copyright (C) 2011-2014,2019 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -88,7 +88,7 @@ namespace gnote {
 
         DBG_OUT ("Dropped into notebook: %s", note->get_title().c_str());
 
-        destNotebook->add_note(static_pointer_cast<Note>(note));
+        destNotebook->add_note(std::static_pointer_cast<Note>(note));
       }
 
       context->drag_finish (true, false, time_);
diff --git a/src/notebooks/specialnotebooks.cpp b/src/notebooks/specialnotebooks.cpp
index f6b10f78..25a28f7a 100644
--- a/src/notebooks/specialnotebooks.cpp
+++ b/src/notebooks/specialnotebooks.cpp
@@ -38,7 +38,7 @@ Tag::Ptr SpecialNotebook::get_tag() const
 
 Note::Ptr SpecialNotebook::get_template_note() const
 {
-  return static_pointer_cast<Note>(m_note_manager.get_or_create_template_note());
+  return std::static_pointer_cast<Note>(m_note_manager.get_or_create_template_note());
 }
 
 
@@ -166,7 +166,7 @@ Glib::RefPtr<Gdk::Pixbuf> ActiveNotesNotebook::get_icon()
 
 void ActiveNotesNotebook::on_note_deleted(const NoteBase::Ptr & note)
 {
-  std::set<Note::Ptr>::iterator iter = m_notes.find(static_pointer_cast<Note>(note));
+  std::set<Note::Ptr>::iterator iter = m_notes.find(std::static_pointer_cast<Note>(note));
   if(iter != m_notes.end()) {
     m_notes.erase(iter);
     signal_size_changed();
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index 73449a2c..00071fb8 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -222,7 +222,7 @@ namespace gnote {
     // changed when loading addins.
     NoteBase::List notesCopy(m_notes);
     for(const NoteBase::Ptr & iter : notesCopy) {
-      Note::Ptr note(static_pointer_cast<Note>(iter));
+      Note::Ptr note(std::static_pointer_cast<Note>(iter));
 
       m_addin_mgr->load_addins_for_note (note);
     }
@@ -288,7 +288,7 @@ namespace gnote {
     NoteBase::Ptr new_note = NoteManagerBase::create_new_note(title, guid);
 
     // Select the inital text so typing will overwrite the body text
-    static_pointer_cast<Note>(new_note)->get_buffer()->select_note_body();
+    std::static_pointer_cast<Note>(new_note)->get_buffer()->select_note_body();
 
     return new_note;
   }
@@ -300,7 +300,7 @@ namespace gnote {
     NoteBase::Ptr new_note = NoteManagerBase::create_new_note(title, xml_content, guid);
 
     // Load all the addins for the new note
-    m_addin_mgr->load_addins_for_note(static_pointer_cast<Note>(new_note));
+    m_addin_mgr->load_addins_for_note(std::static_pointer_cast<Note>(new_note));
 
     return new_note;
   }
@@ -315,7 +315,7 @@ namespace gnote {
     NoteBase::Ptr template_note = NoteManagerBase::get_or_create_template_note();
 
     // Select the initial text
-    Glib::RefPtr<NoteBuffer> buffer = static_pointer_cast<Note>(template_note)->get_buffer();
+    Glib::RefPtr<NoteBuffer> buffer = std::static_pointer_cast<Note>(template_note)->get_buffer();
     buffer->select_note_body();
 
     return template_note;
@@ -339,7 +339,7 @@ namespace gnote {
       new_note->data().width() = template_note->data().width();
     }
 
-    Glib::RefPtr<Gtk::TextBuffer> buffer = static_pointer_cast<Note>(new_note)->get_buffer();
+    Glib::RefPtr<Gtk::TextBuffer> buffer = std::static_pointer_cast<Note>(new_note)->get_buffer();
     Gtk::TextIter cursor, selection;
     Tag::Ptr template_save_selection = 
ITagManager::obj().get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SELECTION_SYSTEM_TAG);
     if(template_note->contains_tag(template_save_selection)) {
diff --git a/src/notemanagerbase.cpp b/src/notemanagerbase.cpp
index 9e278a05..f6b79ced 100644
--- a/src/notemanagerbase.cpp
+++ b/src/notemanagerbase.cpp
@@ -39,7 +39,7 @@ namespace gnote {
 
 bool compare_dates(const NoteBase::Ptr & a, const NoteBase::Ptr & b)
 {
-  return (static_pointer_cast<Note>(a)->change_date() > static_pointer_cast<Note>(b)->change_date());
+  return (std::static_pointer_cast<Note>(a)->change_date() > 
std::static_pointer_cast<Note>(b)->change_date());
 }
 
 
@@ -319,7 +319,7 @@ NoteBase::Ptr NoteManagerBase::create_new_note(Glib::ustring title, const Glib::
   NoteBase::Ptr new_note = create_new_note(title, content, guid);
 
   // Select the inital text so typing will overwrite the body text
-  static_pointer_cast<Note>(new_note)->get_buffer()->select_note_body();
+  std::static_pointer_cast<Note>(new_note)->get_buffer()->select_note_body();
 
   return new_note;
 }
diff --git a/src/noterenamedialog.cpp b/src/noterenamedialog.cpp
index 7b1a317d..697c0838 100644
--- a/src/noterenamedialog.cpp
+++ b/src/noterenamedialog.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2014,2017 Aurimas Cernius
+ * Copyright (C) 2011-2014,2017,2019 Aurimas Cernius
  * Copyright (C) 2010 Debarshi Ray
  *
  * This program is free software: you can redistribute it and/or modify
@@ -121,7 +121,7 @@ NoteRenameDialog::NoteRenameDialog(const NoteBase::List & notes,
                                    const Glib::ustring & old_title,
                                    const NoteBase::Ptr & renamed_note)
   : Gtk::Dialog(_("Rename Note Links?"),
-                *dynamic_cast<Gtk::Window*>(static_pointer_cast<Note>(renamed_note)->get_window()->host()),
+                
*dynamic_cast<Gtk::Window*>(std::static_pointer_cast<Note>(renamed_note)->get_window()->host()),
                 false)
   , m_notes_model(Gtk::ListStore::create(m_model_column_record))
   , m_dont_rename_button(_("_Don't Rename Links"), true)
@@ -361,7 +361,7 @@ void NoteRenameDialog::on_notes_view_row_activated(
   if (!note)
     return;
 
-  MainWindow *window = MainWindow::present_default(static_pointer_cast<Note>(note));
+  MainWindow *window = MainWindow::present_default(std::static_pointer_cast<Note>(note));
   if(window) {
     window->set_search_text(Glib::ustring::compose("\"%1\"", old_title));
     window->show_search_bar();
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index 4045338c..10c6e590 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -353,7 +353,7 @@ namespace gnote {
   {
     // Prompt for note deletion
     std::list<Note::Ptr> single_note_list;
-    single_note_list.push_back(static_pointer_cast<Note>(m_note.shared_from_this()));
+    single_note_list.push_back(std::static_pointer_cast<Note>(m_note.shared_from_this()));
     noteutils::show_deletion_dialog(single_note_list, dynamic_cast<Gtk::Window*>(host()));
   }
 
@@ -560,7 +560,7 @@ namespace gnote {
       m_note.get_buffer()->apply_tag(m_note.get_tag_table()->get_link_tag(), start, end);
     }
 
-    MainWindow::present_in(*dynamic_cast<MainWindow*>(host()), static_pointer_cast<Note>(match));
+    MainWindow::present_in(*dynamic_cast<MainWindow*>(host()), std::static_pointer_cast<Note>(match));
   }
 
   void NoteWindow::open_help_activate()
@@ -1076,7 +1076,7 @@ namespace gnote {
     }
 
     MainWindow::present_in(*dynamic_cast<MainWindow*>(m_buffer->note().get_window()->host()),
-                           static_pointer_cast<Note>(match));
+                           std::static_pointer_cast<Note>(match));
   }
 
   //
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index 46e95332..79f23b6a 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2015,2017 Aurimas Cernius
+ * Copyright (C) 2010-2015,2017,2019 Aurimas Cernius
  * Copyright (C) 2009 Debarshi Ray
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -971,7 +971,7 @@ namespace gnote {
     NoteBase::Ptr template_note = m_note_manager.get_or_create_template_note();
 
     // Open the template note
-    IGnote::obj().open_note(static_pointer_cast<Note>(template_note));
+    IGnote::obj().open_note(std::static_pointer_cast<Note>(template_note));
   }
 
 
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index e12dbc66..30267435 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -347,7 +347,7 @@ namespace gnote {
       search_wgt->new_note();
     }
     else {
-      present_note(static_pointer_cast<Note>(m_note_manager.create()));
+      present_note(std::static_pointer_cast<Note>(m_note_manager.create()));
     }
   }
 
diff --git a/src/search.cpp b/src/search.cpp
index 752c0d32..8de06ed9 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -56,7 +56,7 @@ namespace gnote {
     Tag::Ptr template_tag = 
ITagManager::obj().get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SYSTEM_TAG);
 
     for(const NoteBase::Ptr & iter : m_manager.get_notes()) {
-      Note::Ptr note(static_pointer_cast<Note>(iter));
+      Note::Ptr note(std::static_pointer_cast<Note>(iter));
 
       // Skip template notes
       if (note->contains_tag (template_tag)) {
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 1efc29f1..5f078fe8 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -347,7 +347,7 @@ void SearchNotesWidget::on_notebook_row_edited(const Glib::ustring& /*tree_path*
   old_notebook->get_tag()->get_notes(notes);
   for(NoteBase *note : notes) {
     notebooks::NotebookManager::obj().move_note_to_notebook(
-      static_pointer_cast<Note>(note->shared_from_this()), new_notebook);
+      std::static_pointer_cast<Note>(note->shared_from_this()), new_notebook);
   }
   notebooks::NotebookManager::obj().delete_notebook(old_notebook);
   Gtk::TreeIter iter;
@@ -514,7 +514,7 @@ void SearchNotesWidget::update_results()
   int cnt = 0;
 
   for(const NoteBase::Ptr & note_iter : m_manager.get_notes()) {
-    Note::Ptr note(static_pointer_cast<Note>(note_iter));
+    Note::Ptr note(std::static_pointer_cast<Note>(note_iter));
     Glib::ustring nice_date = utils::get_pretty_print_date(note->change_date(), true);
 
     Gtk::TreeIter iter = m_store->append();
@@ -1155,20 +1155,20 @@ int SearchNotesWidget::compare_search_hits(const Gtk::TreeIter & a, const Gtk::T
 void SearchNotesWidget::on_note_deleted(const NoteBase::Ptr & note)
 {
   restore_matches_window();
-  delete_note(static_pointer_cast<Note>(note));
+  delete_note(std::static_pointer_cast<Note>(note));
 }
 
 void SearchNotesWidget::on_note_added(const NoteBase::Ptr & note)
 {
   restore_matches_window();
-  add_note(static_pointer_cast<Note>(note));
+  add_note(std::static_pointer_cast<Note>(note));
 }
 
 void SearchNotesWidget::on_note_renamed(const NoteBase::Ptr & note,
                                         const Glib::ustring &)
 {
   restore_matches_window();
-  rename_note(static_pointer_cast<Note>(note));
+  rename_note(std::static_pointer_cast<Note>(note));
 }
 
 void SearchNotesWidget::on_note_saved(const NoteBase::Ptr&)
@@ -1321,7 +1321,7 @@ void SearchNotesWidget::new_note()
   notebooks::Notebook::Ptr notebook = get_selected_notebook();
   if(!notebook || dynamic_pointer_cast<notebooks::SpecialNotebook>(notebook)) {
     // Just create a standard note (not in a notebook)
-    note = static_pointer_cast<Note>(m_manager.create());
+    note = std::static_pointer_cast<Note>(m_manager.create());
   }
   else {
     // Look for the template note and create a new note
diff --git a/src/synchronization/syncdialog.cpp b/src/synchronization/syncdialog.cpp
index bdae1c85..bfc40872 100644
--- a/src/synchronization/syncdialog.cpp
+++ b/src/synchronization/syncdialog.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012-2014,2016,2017 Aurimas Cernius
+ * Copyright (C) 2012-2014,2016,2017,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -423,7 +423,7 @@ void SyncDialog::on_row_activated(const Gtk::TreeModel::Path & path, Gtk::TreeVi
 
   NoteBase::Ptr note = m_manager.find(noteTitle);
   if(note != 0) {
-    present_note(static_pointer_cast<Note>(note));
+    present_note(std::static_pointer_cast<Note>(note));
   }
 }
 
@@ -723,7 +723,7 @@ void SyncDialog::rename_note(const Note::Ptr & note, const Glib::ustring & newTi
 
   // Create note with old XmlContent just in case GetCompleteNoteXml failed
   DBG_OUT("RenameNote: about to create %s", newTitle.c_str());
-  Note::Ptr renamedNote = static_pointer_cast<Note>(m_manager.create(newTitle, newContent));
+  Note::Ptr renamedNote = std::static_pointer_cast<Note>(m_manager.create(newTitle, newContent));
   if(newCompleteContent != "") {// TODO: Anything to do if it is null?
     try {
       renamedNote->load_foreign_note_xml(newCompleteContent, OTHER_DATA_CHANGED);
diff --git a/src/synchronization/syncmanager.cpp b/src/synchronization/syncmanager.cpp
index f390df93..63e773e1 100644
--- a/src/synchronization/syncmanager.cpp
+++ b/src/synchronization/syncmanager.cpp
@@ -228,10 +228,10 @@ namespace sync {
       for(auto & iter : noteUpdates) {
         if(!find_note_by_uuid(iter.second.m_uuid) != 0) {
           NoteBase::Ptr existingNote = note_mgr().find(iter.second.m_title);
-          if(existingNote != 0 && !iter.second.basically_equal_to(static_pointer_cast<Note>(existingNote))) {
+          if(existingNote != 0 && 
!iter.second.basically_equal_to(std::static_pointer_cast<Note>(existingNote))) {
             DBG_OUT("Sync: Early conflict detection for '%s'", iter.second.m_title.c_str());
             if(m_sync_ui != 0) {
-              m_sync_ui->note_conflict_detected(static_pointer_cast<Note>(existingNote), iter.second, 
noteUpdateTitles);
+              m_sync_ui->note_conflict_detected(std::static_pointer_cast<Note>(existingNote), iter.second, 
noteUpdateTitles);
             }
           }
         }
@@ -255,21 +255,21 @@ namespace sync {
           existingNote = note_mgr().find(iter.second.m_title);
           if(existingNote != 0) {
             DBG_OUT("SyncManager: Deleting auto-generated note: %s", iter.second.m_title.c_str());
-            delete_note_in_main_thread(static_pointer_cast<Note>(existingNote));
+            delete_note_in_main_thread(std::static_pointer_cast<Note>(existingNote));
           }
           create_note_in_main_thread(iter.second);
         }
         else if(existingNote->metadata_change_date() <= m_client->last_sync_date()
-                || iter.second.basically_equal_to(static_pointer_cast<Note>(existingNote))) {
+                || iter.second.basically_equal_to(std::static_pointer_cast<Note>(existingNote))) {
           // Existing note hasn't been modified since last sync; simply update it from server
-          update_note_in_main_thread(static_pointer_cast<Note>(existingNote), iter.second);
+          update_note_in_main_thread(std::static_pointer_cast<Note>(existingNote), iter.second);
         }
         else {
           // Logger.Debug ("Sync: Late conflict detection for '{0}'", noteUpdate.Title);
           DBG_OUT("SyncManager: Content conflict in note update for note '%s'", iter.second.m_title.c_str());
           // Note already exists locally, but has been modified since last sync; prompt user
           if(m_sync_ui != 0) {
-            m_sync_ui->note_conflict_detected(static_pointer_cast<Note>(existingNote), iter.second, 
noteUpdateTitles);
+            m_sync_ui->note_conflict_detected(std::static_pointer_cast<Note>(existingNote), iter.second, 
noteUpdateTitles);
           }
 
           // Note has been deleted or okay'd for overwrite
@@ -277,7 +277,7 @@ namespace sync {
           if(existingNote == 0)
             create_note_in_main_thread(iter.second);
           else
-            update_note_in_main_thread(static_pointer_cast<Note>(existingNote), iter.second);
+            update_note_in_main_thread(std::static_pointer_cast<Note>(existingNote), iter.second);
         }
       }
 
@@ -294,7 +294,7 @@ namespace sync {
       // and upload new or modified ones to the server
       std::list<Note::Ptr> newOrModifiedNotes;
       for(const NoteBase::Ptr & iter : note_mgr().get_notes()) {
-        Note::Ptr note = static_pointer_cast<Note>(iter);
+        Note::Ptr note = std::static_pointer_cast<Note>(iter);
         if(m_client->get_revision(note) == -1) {
           // This is a new note that has never been synchronized to the server
           // TODO: *OR* this is a note that we lost revision info for!!!
@@ -488,7 +488,7 @@ namespace sync {
       bool client_has_updates = m_client->deleted_note_titles().size() > 0;
       if(!client_has_updates) {
         for(const NoteBase::Ptr & iter : note_mgr().get_notes()) {
-          Note::Ptr note = static_pointer_cast<Note>(iter);
+          Note::Ptr note = std::static_pointer_cast<Note>(iter);
           if(m_client->get_revision(note) == -1 || note->metadata_change_date() > 
m_client->last_sync_date()) {
             client_has_updates = true;
             break;
@@ -611,7 +611,7 @@ namespace sync {
     }
     catch(...)
     {} // TODO: Handle exception in case that serverNote.XmlContent is invalid XML
-    m_client->set_revision(static_pointer_cast<Note>(localNote), serverNote.m_latest_revision);
+    m_client->set_revision(std::static_pointer_cast<Note>(localNote), serverNote.m_latest_revision);
 
     // Update dialog's sync status
     if(m_sync_ui != 0) {
@@ -695,7 +695,7 @@ namespace sync {
 
       // Delete notes locally that have been deleted on the server
       for(const NoteBase::Ptr & iter : localNotes) {
-        Note::Ptr note = static_pointer_cast<Note>(iter);
+        Note::Ptr note = std::static_pointer_cast<Note>(iter);
        if(SyncManager::_obj().m_client->get_revision(note) != -1
           && std::find(serverNotes.begin(), serverNotes.end(), note->id()) == serverNotes.end()) {
          if(m_sync_ui != 0) {
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 9a184f6c..8300a27e 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -862,7 +862,7 @@ namespace gnote {
 
     // Highlight previously unlinked text
     if (contains_text (renamed->get_title())) {
-      highlight_note_in_block(static_pointer_cast<Note>(renamed), get_buffer()->begin(), 
get_buffer()->end());
+      highlight_note_in_block(std::static_pointer_cast<Note>(renamed), get_buffer()->begin(), 
get_buffer()->end());
     }
   }
 
@@ -1048,7 +1048,7 @@ namespace gnote {
     // also works around the bug.
     if (link) {
       DBG_OUT ("Opening note '%s' on click...", link_name.c_str());
-      MainWindow::present_default(static_pointer_cast<Note>(link));
+      MainWindow::present_default(std::static_pointer_cast<Note>(link));
       return true;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]