[gnome-commander] src/gnome-cmd-data.cc: fix for -Winline



commit d5806e15888c7beacd2abe24db2431c62871bd2f
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date:   Sun Apr 23 12:43:35 2017 +0900

    src/gnome-cmd-data.cc: fix for -Winline
    
    src/gnome-cmd-data.cc:1960:13: error: inlining failed in call to 'void add_vfs_volume(GnomeVFSVolume*)': 
--param inline-unit-growth limit reached [-Werror=inline]
    src/gnome-cmd-regex.h:102:12: error: inlining failed in call to 
'GnomeCmd::ReplacePattern::ReplacePattern(const gchar*, const gchar*, gboolean)': --param inline-unit-growth 
limit reached [-Werror=inline]
    
    likewise

 src/gnome-cmd-data.cc |    4 ++--
 src/gnome-cmd-regex.h |   10 ++++------
 2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 5546e8d..162f75d 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1599,7 +1599,7 @@ static void save_devices (const gchar *fname)
  * @note This function should be deleted a while after
  * the release of gcmd-v1.6, see @link load_fav_apps @endlink.
  */
-inline void save_devices_old (const gchar *fname)
+static void save_devices_old (const gchar *fname)
 {
     gchar *path = config_dir ?
         g_build_filename (config_dir, fname, NULL) :
@@ -1957,7 +1957,7 @@ inline gboolean device_mount_point_exists (GnomeCmdConList *list, const gchar *m
 }
 
 
-inline void add_vfs_volume (GnomeVFSVolume *volume)
+static void add_vfs_volume (GnomeVFSVolume *volume)
 {
     if (!gnome_vfs_volume_is_user_visible (volume))
         return;
diff --git a/src/gnome-cmd-regex.h b/src/gnome-cmd-regex.h
index 074bff9..195430c 100644
--- a/src/gnome-cmd-regex.h
+++ b/src/gnome-cmd-regex.h
@@ -45,8 +45,11 @@ namespace GnomeCmd
 
         ReplacePattern()    {}
         ~ReplacePattern()   {}
-        ReplacePattern(const gchar *from, const gchar *to, gboolean case_sensitive);
         ReplacePattern(const std::string &from, const std::string &to, gboolean case_sensitive): 
FindPattern(from,case_sensitive), replacement(to) {}
+        ReplacePattern(const gchar *from, const gchar *to, gboolean case_sensitive): 
FindPattern(from,case_sensitive)
+          {
+              if (to)  replacement = to;
+          }
     };
 
     class Regex: virtual public FindPattern
@@ -99,11 +102,6 @@ namespace GnomeCmd
         gchar *replace(const std::string &s)    {  return replace(s.c_str());  }
     };
 
-    inline ReplacePattern::ReplacePattern(const gchar *from, const gchar *to, gboolean case_sensitive): 
FindPattern(from,case_sensitive)
-    {
-        if (to)  replacement = to;
-    }
-
     inline Regex::Regex(): malformed_pattern(TRUE)
     {
         re = NULL;


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