summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/trim.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils/trim.h b/src/utils/trim.h
index 19d37909..1b5311e6 100644
--- a/src/utils/trim.h
+++ b/src/utils/trim.h
@@ -21,6 +21,9 @@
* $Id$
*/
+#ifndef _TMW_UTILS_TRIM_H_
+#define _TMW_UTILS_TRIM_H_
+
#include <string>
/**
@@ -28,7 +31,7 @@
*
* @param str the string to trim spaces off
*/
-void trim(std::string &str)
+static void trim(std::string &str)
{
std::string::size_type pos = str.find_last_not_of(' ');
if (pos != std::string::npos)
@@ -46,3 +49,5 @@ void trim(std::string &str)
str.clear();
}
}
+
+#endif