--- a/src/core/log.cc Wed Nov 21 14:06:46 2007 +0100
+++ b/src/core/log.cc Wed Nov 21 14:14:12 2007 +0100
@@ -110,23 +110,10 @@
std::string::size_type cur = 0;
std::string::size_type next = 0;
- while (true)
+ while (next != std::string::npos)
{
next = env.find_first_of (";", cur);
- std::string tmp = std::string (env, cur, next);
- {
- /* The following code is a workaround for a bug in the g++
- * c++ string library. Its goal is to remove any trailing ';'
- * from the string even though there should not be any in
- * it. This code should be safe even if the bug is not there.
- */
- std::string::size_type trailing = tmp.find_first_of (";");
- tmp = tmp.substr (0, trailing);
- }
- if (tmp.size () == 0)
- {
- break;
- }
+ std::string tmp = std::string (env, cur, next-cur);
std::string::size_type equal = tmp.find ("=");
std::string component;
if (equal == std::string::npos)
@@ -224,15 +211,7 @@
Enable ((enum LogLevel)level);
}
}
- if (next == std::string::npos)
- {
- break;
- }
cur = next + 1;
- if (cur >= env.size ())
- {
- break;
- }
}
#endif
}