summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-24 12:32:19 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-24 12:32:19 +0000
commit2debd445c71e65265359b6471795cab2cb2c7086 (patch)
tree695f276a3ae343f2a182dd2d3bb75afa6254f899 /src/utils
parent15c9ca70fa37dc8bae6b9ebd63209f5d0f7b0756 (diff)
downloadmana-2debd445c71e65265359b6471795cab2cb2c7086.tar.gz
mana-2debd445c71e65265359b6471795cab2cb2c7086.tar.bz2
mana-2debd445c71e65265359b6471795cab2cb2c7086.tar.xz
mana-2debd445c71e65265359b6471795cab2cb2c7086.zip
Added trimming of name for new character creation and of chat messages
appearing above players. Also improved resize mouse cursor indication, removing duplicated code and fixing indicator above resize grip.
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