aboutsummaryrefslogtreecommitdiff
path: root/src/strfnd.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-22 16:30:23 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-22 16:30:23 +0200
commit3de176cc587c4e0601c3c3f5a049e30db6bd2c17 (patch)
tree0a85d68c29e1354acda46e0c4e46e80a6f891039 /src/strfnd.h
parent2e41a5e304d9c35ece851b8a65482bca8784b582 (diff)
downloadhax-minetest-server-3de176cc587c4e0601c3c3f5a049e30db6bd2c17.tar.gz
hax-minetest-server-3de176cc587c4e0601c3c3f5a049e30db6bd2c17.zip
crafting system!
Diffstat (limited to 'src/strfnd.h')
-rw-r--r--src/strfnd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/strfnd.h b/src/strfnd.h
index bbd0fa1e0..2be92d43b 100644
--- a/src/strfnd.h
+++ b/src/strfnd.h
@@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
-std::string trim(std::string str);
+std::string trim(const std::string &str);
class Strfnd{
std::string tek;
@@ -74,8 +74,9 @@ public:
}
};
-inline std::string trim(std::string str)
+inline std::string trim(const std::string &s)
{
+ std::string str = s;
while(
str.length()>0
&&