[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kphotoalbum/soc/SQLDB
From: Tuomas Suutari <thsuut () utu ! fi>
Date: 2006-07-17 12:14:15
Message-ID: 1153138455.993403.18412.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 563367 by suutari:
Clean-up QueryHelper::idListForTag().
M +6 -4 QueryHelper.cpp
--- branches/kphotoalbum/soc/SQLDB/QueryHelper.cpp #563366:563367
@@ -561,17 +561,19 @@
Bindings() << category << item).firstItem().toInt();
}
-QValueList<int> QueryHelper::idListForTag(const QString& category, const QString& item)
+QValueList<int> QueryHelper::idListForTag(const QString& category,
+ const QString& item)
{
int tagId = idForTag(category, item);
QValueList<int> visited, queue;
visited << tagId;
queue << tagId;
- while (queue.count() > 0) {
+ while (!queue.empty()) {
QValueList<int> adj = getDirectMembers(queue.first());
queue.pop_front();
- for (QValueList<int>::const_iterator a = adj.begin();
- a != adj.end(); ++a) {
+ QValueListConstIterator<int> adjEnd(adj.constEnd());
+ for (QValueList<int>::const_iterator a = adj.constBegin();
+ a != adjEnd; ++a) {
if (!visited.contains(*a)) {
queue << *a;
visited << *a;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic