[gnote] Remove redundant casts



commit 6d9a8a0b96cb69b3941a629df168d864658e9aa0
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat Jul 11 18:20:04 2020 +0300

    Remove redundant casts

 src/dbus/remotecontrol.cpp | 2 +-
 src/watchers.cpp           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 195f3be8..fd77b96c 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -210,7 +210,7 @@ namespace gnote {
     NoteBase::Ptr note = m_manager.find_by_uri(uri);
     if (!note)
       return "";
-    return std::static_pointer_cast<Note>(note)->text_content();
+    return note->text_content();
   }
 
 
diff --git a/src/watchers.cpp b/src/watchers.cpp
index ecede1bc..35561eba 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -859,7 +859,7 @@ namespace gnote {
 
   bool AppLinkWatcher::contains_text(const NoteBase::Ptr & note, const Glib::ustring & text)
   {
-    Glib::ustring body = std::static_pointer_cast<Note>(note)->text_content().lowercase();
+    Glib::ustring body = note->text_content().lowercase();
     Glib::ustring match = text.lowercase();
 
     return body.find(match) != Glib::ustring::npos;


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