[gnome-commander] Removes gcc warning about inlining function (large-stack-frame-growth)



commit 70185567fefe1219551646757f3c36d883750ec1
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Mar 19 22:13:09 2017 +0100

    Removes gcc warning about inlining function (large-stack-frame-growth)

 src/dialogs/gnome-cmd-con-dialog.cc |    2 +-
 src/utils.cc                        |   30 ++++++++++++++++++++++++++++++
 src/utils.h                         |   29 ++---------------------------
 3 files changed, 33 insertions(+), 28 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-con-dialog.cc b/src/dialogs/gnome-cmd-con-dialog.cc
index 0df4ab6..f27136e 100644
--- a/src/dialogs/gnome-cmd-con-dialog.cc
+++ b/src/dialogs/gnome-cmd-con-dialog.cc
@@ -278,7 +278,7 @@ inline void GnomeCmdConnectDialog::Private::show_entry(GtkWidget *table, GtkWidg
 }
 
 
-inline gboolean GnomeCmdConnectDialog::verify_uri()
+gboolean GnomeCmdConnectDialog::verify_uri()
 {
     string uri;
     string server;
diff --git a/src/utils.cc b/src/utils.cc
index 54c7827..c1aa5bc 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1360,6 +1360,26 @@ void gnome_cmd_toggle_file_name_selection (GtkWidget *entry)
 }
 
 
+void gnome_cmd_help_display (const gchar *file_name, const gchar *link_id)
+{
+    GError *error = NULL;
+    gchar help_uri[256] = "help:";
+
+    strcat(help_uri, PACKAGE_NAME);
+
+    if (link_id != NULL)
+    {
+        strcat(help_uri, "/");
+        strcat(help_uri, link_id);
+    }
+
+    gtk_show_uri (NULL, help_uri,  gtk_get_current_event_time (), &error);
+
+    if (error != NULL)
+        gnome_cmd_error_message (_("There was an error displaying help."), error);
+}
+
+
 gboolean gnome_cmd_prepend_su_to_vector (int &argc, char **&argv)
 {
     // sanity
@@ -1415,6 +1435,16 @@ gboolean gnome_cmd_prepend_su_to_vector (int &argc, char **&argv)
     return TRUE;
 }
 
+template <typename T>
+std::string &stringify(std::string &s, const T &val)
+{
+   std::ostringstream os;
+
+   os << val;
+   s = os.str();
+
+   return s;
+}
 
 int split(const string &s, vector<string> &coll, const char *sep)
 {
diff --git a/src/utils.h b/src/utils.h
index c833961..4bf1783 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -278,24 +278,7 @@ inline void gnome_cmd_show_message (GtkWindow *parent, std::string message, cons
 }
 
 
-inline void gnome_cmd_help_display (const gchar *file_name, const gchar *link_id=NULL)
-{
-    GError *error = NULL;
-    gchar help_uri[256] = "help:";
-
-    strcat(help_uri, PACKAGE_NAME);
-
-    if (link_id != NULL)
-    {
-        strcat(help_uri, "/");
-        strcat(help_uri, link_id);
-    }
-
-    gtk_show_uri (NULL, help_uri,  gtk_get_current_event_time (), &error);
-
-    if (error != NULL)
-        gnome_cmd_error_message (_("There was an error displaying help."), error);
-}
+void gnome_cmd_help_display (const gchar *file_name, const gchar *link_id=NULL);
 
 
 inline void gnome_cmd_error_message (const gchar *title, GError *error)
@@ -332,15 +315,7 @@ inline std::string &stringify(std::string &s, gchar *val)
 }
 
 template <typename T>
-inline std::string &stringify(std::string &s, const T &val)
-{
-   std::ostringstream os;
-
-   os << val;
-   s = os.str();
-
-   return s;
-}
+std::string &stringify(std::string &s, const T &val);
 
 inline std::string stringify(gchar *val)
 {


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