]> git.lizzy.rs Git - minetest.git/blobdiff - src/strfnd.h
changed node metadata format to better accomodate future needs and problems
[minetest.git] / src / strfnd.h
index bbd0fa1e090357aa93f6246ea73ef9491d9980ff..2be92d43b03d6b51dbf1c4907a1d16f5d268f948 100644 (file)
@@ -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 @@ class Strfnd{
     }
 };
 
-inline std::string trim(std::string str)
+inline std::string trim(const std::string &s)
 {
+       std::string str = s;
     while( 
             str.length()>0
             &&