[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: "Fixed" post-increment operators on iterators
From: Andrew Coles <andrew_coles () yahoo ! co ! uk>
Date: 2004-10-28 9:58:27
Message-ID: 200410281058.27379.andrew_coles () yahoo ! co ! uk
[Download RAW message or body]
On Wednesday 27 Oct 2004 22:44, Aaron Seigo wrote:
> also, while you're at it there, you should cache the end(), like:
>
> QStringList::ConstIterator itEnd = matches.end();
Or even:
const QStringList::ConstIterator itEnd = matches.end();
- that way it stops one doing ++itEnd instead of ++it.
Speaking of constness: I'm going through making functions' member variables
const where applicable when checking for post-increments, end()s and so on.
It does no harm and the code is potentially faster and more robust as a
result.
Andrew
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic