From 3de176cc587c4e0601c3c3f5a049e30db6bd2c17 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 22 Dec 2010 16:30:23 +0200 Subject: crafting system! --- src/strfnd.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/strfnd.h') 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 -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 && -- cgit v1.2.3