[gnote] Remove string_index_of from watchers



commit b216995d912179954701461035f3d58bc65954ff
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Jan 22 20:59:44 2017 +0200

    Remove string_index_of from watchers

 src/watchers.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 77c1d92..f55c594 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -451,7 +451,7 @@ namespace gnote {
     std::list<Tag::Ptr> tags;
     get_note()->get_tags(tags);
     FOREACH(Tag::Ptr tag, tags) {
-      if(sharp::string_index_of(tag->name(), LANG_PREFIX) == 0) {
+      if(tag->name().find(LANG_PREFIX) == 0) {
         lang_tag = tag;
         break;
       }
@@ -812,7 +812,7 @@ namespace gnote {
     Glib::ustring body = get_note()->text_content().lowercase();
     Glib::ustring match = text.lowercase();
 
-    return sharp::string_index_of(body, match) > -1;
+    return body.find(match) != Glib::ustring::npos;
   }
 
 
@@ -942,7 +942,7 @@ namespace gnote {
     int idx = 0;
 
     while (true) {
-      idx = sharp::string_index_of(buffer_text, find_title_lower, idx);
+      idx = buffer_text.find(find_title_lower, idx);
       if (idx < 0)
         break;
 


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