[gnome-commander] Moves template for stringify function back in header file
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Moves template for stringify function back in header file
- Date: Fri, 14 Apr 2017 13:23:02 +0000 (UTC)
commit de8c4eb99616473ffa6d9fee3f58456400f11a28
Author: Uwe Scholz <uwescholz src gnome org>
Date: Fri Apr 14 15:21:57 2017 +0200
Moves template for stringify function back in header file
src/utils.cc | 11 -----------
src/utils.h | 10 +++++++++-
2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/src/utils.cc b/src/utils.cc
index c1aa5bc..cd2c4b3 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1435,17 +1435,6 @@ 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)
{
coll.clear();
diff --git a/src/utils.h b/src/utils.h
index 4bf1783..373a7e1 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -315,7 +315,15 @@ inline std::string &stringify(std::string &s, gchar *val)
}
template <typename T>
-std::string &stringify(std::string &s, const T &val);
+std::string &stringify(std::string &s, const T &val)
+{
+ std::ostringstream os;
+
+ os << val;
+ s = os.str();
+
+ return s;
+}
inline std::string stringify(gchar *val)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]