Speed optimisations.

This commit is contained in:
Ianos Gnatiuc
2007-01-11 22:26:06 +00:00
parent c58810fefe
commit 57563ba911
6 changed files with 245 additions and 189 deletions

View File

@@ -506,9 +506,10 @@ std::string &strtrim(std::string &str)
{
if (!str.empty())
{
std::string::iterator begin = str.begin();
std::string::iterator trail = str.end();
while(trail != str.begin())
while (trail != begin)
{
--trail;
if (not isspace(*trail) and not iscntrl(*trail))