]> git.lyx.org Git - lyx.git/blobdiff - src/support/StrPool.C
small cleanup, doxygen, formatting changes
[lyx.git] / src / support / StrPool.C
index 17d9bab865c253ed6fb86fc0066f3c61020dc7eb..7dd6168f171ba66d7daf67192c3c4137f7dbc47b 100644 (file)
 #include <config.h>
 #include "StrPool.h"
 
+
 StrPool::~StrPool()
 {
-        for (Pool::const_iterator cit = pool_.begin() 
+        for (Pool::const_iterator cit = pool_.begin(); 
             cit != pool_.end() ; ++cit) {
                 delete[] (*cit);
         }
 }
 
+/* One interesting thing here would be to store the strings in a map,
+   so that one string is only stored once. This would make things a
+   bit slower, but memory requirements would be lower in the long run.
+   I expect that it would be fast enough anyway. (Lgb)
+*/
 char const * StrPool::add(string const & str)
 {
-       int s = str.length();
+       string::size_type s = str.length();
         char * buf = new char [s + 1];
         str.copy(buf, s);
         buf[s] = '\0';
@@ -33,3 +39,5 @@ char const * StrPool::add(string const & str)
         return buf;
 }
 
+//StrPool strPool;
+