[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kab
From: Benjamin Meyer <benjamin () csh ! rit ! edu>
Date: 2004-11-22 2:32:07
Message-ID: 20041122023207.ED5E217020 () office ! kde ! org
[Download RAW message or body]
CVS commit by bmeyer:
cache length of the line sense it is a QCString and length is calculated
every single time .length() is called.
M +5 -4 qconfigDB.cc 1.30
--- kdelibs/kab/qconfigDB.cc #1.29:1.30
@@ -565,6 +565,7 @@ KeyValueMap::insertLine(QCString line, b
QCString value;
// ----- is the line empty or does it contain only whitespaces?
- for(index=0; isspace(line[index]) && (unsigned)index<line.length(); ++index);
- if(line.isEmpty() || (unsigned)index==line.length())
+ uint len = line.length();
+ for(index=0; isspace(line[index]) && (unsigned)index<len; ++index);
+ if(line.isEmpty() || (unsigned)index==len)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic