diff options
author | Torgny Nyblom <kde@nyblom.org> | 2010-11-27 07:04:52 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-11-27 07:04:52 +0100 |
commit | 5f14cd45c15b9eca56f224a7596db611294c4df0 (patch) | |
tree | 70ef1087f4e9b467392fe2f9ee8256c9b46bbdd5 | |
parent | 3f2534affaa7b0ac65c07610ac39c51d61b779bb (diff) | |
download | svn2git-5f14cd45c15b9eca56f224a7596db611294c4df0.tar svn2git-5f14cd45c15b9eca56f224a7596db611294c4df0.tar.gz svn2git-5f14cd45c15b9eca56f224a7596db611294c4df0.tar.bz2 svn2git-5f14cd45c15b9eca56f224a7596db611294c4df0.tar.xz svn2git-5f14cd45c15b9eca56f224a7596db611294c4df0.zip |
QList<int> -> QSet<int>
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 42b40aa..ad6cde3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,9 +68,9 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName) return result; } -QList<int> loadRevisionsFile( const QString &fileName ) +QSet<int> loadRevisionsFile( const QString &fileName ) { - QList<int> revisions; + QSet<int> revisions; if(fileName.isEmpty()) return revisions; @@ -88,11 +88,10 @@ QList<int> loadRevisionsFile( const QString &fileName ) if(!ok) { fprintf(stderr, "Unable to convert %s to int, skipping revision.", qPrintable(QString(line))); } else { - revisions.append(rev); + revisions.insert(rev); } } file.close(); - qSort(revisions.begin(), revisions.end()); return revisions; } @@ -210,7 +209,7 @@ int main(int argc, char **argv) max_rev = svn.youngestRevision(); bool errors = false; - QList<int> revisions = loadRevisionsFile(args->optionArgument(QLatin1String("revisions-file"))); + QSet<int> revisions = loadRevisionsFile(args->optionArgument(QLatin1String("revisions-file"))); const bool filerRevisions = !revisions.isEmpty(); for (int i = min_rev; i <= max_rev; ++i) { if(filerRevisions) { |