diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-25 08:03:23 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-25 11:43:14 +0000 |
| commit | fcc2431ab132519a0038b6702372d8460d7cd635 (patch) | |
| tree | 25933ed2fd3a8e5a850e2877b26755d613eaf4c7 /sources/shiboken6/ApiExtractor/fileout.cpp | |
| parent | 30620db0941a36298b194d7bfbf5213ba4eb8bba (diff) | |
Replace QVector by QList
Change AbstractMetaClass::templateArguments()
to return TypeEntries (const TypeEntry *) instead
non-const.
Remove redundant typedef OverloadData::MetaFunctionList.
Use existing typedefs in some places.
Add new typedefs for MetaObjectBuilder::EnumValues and
AbstractMetaFunctionCList.
Change-Id: Ia241b5fbe54d60ea57175fb1f6c844604e066a3d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/fileout.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/fileout.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sources/shiboken6/ApiExtractor/fileout.cpp b/sources/shiboken6/ApiExtractor/fileout.cpp index 16cfe2bb5..b35693a38 100644 --- a/sources/shiboken6/ApiExtractor/fileout.cpp +++ b/sources/shiboken6/ApiExtractor/fileout.cpp @@ -64,12 +64,12 @@ FileOut::~FileOut() done(); } -static QVector<int> lcsLength(const QByteArrayList &a, const QByteArrayList &b) +static QList<int> lcsLength(const QByteArrayList &a, const QByteArrayList &b) { const int height = a.size() + 1; const int width = b.size() + 1; - QVector<int> res(width * height, 0); + QList<int> res(width * height, 0); for (int row = 1; row < height; row++) { for (int col = 1; col < width; col++) { @@ -129,7 +129,7 @@ void Unit::print(const QByteArrayList &a, const QByteArrayList &b) const } } -static void unitAppend(Type type, int pos, QVector<Unit> *units) +static void unitAppend(Type type, int pos, QList<Unit> *units) { if (!units->isEmpty() && units->last().type == type) units->last().end = pos; @@ -137,12 +137,12 @@ static void unitAppend(Type type, int pos, QVector<Unit> *units) units->append(Unit{type, pos, pos}); } -static QVector<Unit> diffHelper(const QVector<int> &lcs, +static QList<Unit> diffHelper(const QList<int> &lcs, const QByteArrayList &a, const QByteArrayList &b, int row, int col) { if (row > 0 && col > 0 && a.at(row - 1) == b.at(col - 1)) { - QVector<Unit> result = diffHelper(lcs, a, b, row - 1, col - 1); + QList<Unit> result = diffHelper(lcs, a, b, row - 1, col - 1); unitAppend(Unchanged, row - 1, &result); return result; } @@ -150,22 +150,22 @@ static QVector<Unit> diffHelper(const QVector<int> &lcs, const int width = b.size() + 1; if (col > 0 && (row == 0 || lcs.at(width * row + col -1 ) >= lcs.at(width * (row - 1) + col))) { - QVector<Unit> result = diffHelper(lcs, a, b, row, col - 1); + QList<Unit> result = diffHelper(lcs, a, b, row, col - 1); unitAppend(Add, col - 1, &result); return result; } if (row > 0 && (col == 0 || lcs.at(width * row + col-1) < lcs.at(width * (row - 1) + col))) { - QVector<Unit> result = diffHelper(lcs, a, b, row - 1, col); + QList<Unit> result = diffHelper(lcs, a, b, row - 1, col); unitAppend(Delete, row - 1, &result); return result; } - return QVector<Unit>{}; + return {}; } static void diff(const QByteArrayList &a, const QByteArrayList &b) { - const QVector<Unit> res = diffHelper(lcsLength(a, b), a, b, a.size(), b.size()); + const QList<Unit> res = diffHelper(lcsLength(a, b), a, b, a.size(), b.size()); for (const Unit &unit : res) unit.print(a, b); } |
