[Orxonox-commit 1] r1111 - trunk/src/util

rgrieder at orxonox.net rgrieder at orxonox.net
Sun Mar 1 14:45:58 CET 2009


Author: rgrieder
Date: 2008-04-19 19:53:01 +0200 (Sat, 19 Apr 2008)
New Revision: 1111

Modified:
   trunk/src/util/String.cc
Log:
- fixed a bug String.cc that thought making "1" (or anything with length ) to "" was called 'removing slashes" ;)
- inserted a TODO there: what happens when string is "\" ?

Modified: trunk/src/util/String.cc
===================================================================
--- trunk/src/util/String.cc	2008-04-18 08:28:11 UTC (rev 1110)
+++ trunk/src/util/String.cc	2008-04-19 17:53:01 UTC (rev 1111)
@@ -273,6 +273,14 @@
 {
     if (str.size() == 0)
         return str;
+    else if (str.size() == 1)
+    {
+      //TODO: decide whether we need the commented code
+      /*if (str[0] != '\\')
+        return "";
+      else*/
+      return str;
+    }
 
     std::string output = "";
     for (unsigned int pos = 0; pos < str.size() - 1; )




More information about the Orxonox-commit mailing list