[gnome-commander] Replace g_strrstr() with faster strrchr()



commit 4383bd6366a7c47812572185a595bd7704155862
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Aug 8 20:38:48 2011 +0200

    Replace g_strrstr() with faster strrchr()

 src/gnome-cmd-file-list.cc |    2 +-
 src/utils.cc               |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index ffcdb03..f3fdb17 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -236,7 +236,7 @@ GnomeCmdFileList::GnomeCmdFileList(ColumnID sort_col, GtkSortType sort_order)
 inline gchar *strip_extension (const gchar *fname)
 {
     gchar *s = g_strdup (fname);
-    gchar *p = g_strrstr (s, ".");
+    gchar *p = strrchr(s,'.');
     if (p && p != s)
         *p = '\0';
     return s;
diff --git a/src/utils.cc b/src/utils.cc
index 9e0fdf3..cbfc260 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1245,7 +1245,7 @@ void fix_uri (GnomeVFSURI *uri)
     pw = gnome_vfs_uri_get_password (uri);
 
     t = g_strdup (hn);
-    p = g_strrstr (t, "@");
+    p = strrchr(t,'@');
     if (p && p[1] != '\0')
     {
         gchar *hn2;



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