diff options
author | Minijackson <minijackson@riseup.net> | 2018-07-23 10:23:41 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-07-23 11:02:24 +0200 |
commit | 10b356ff0e015f41c346a72286382ccfc2302d8d (patch) | |
tree | 99890b7e4da593bf09624f453e3fbdc8629c10d2 /common/resultset.cpp | |
parent | c16b34c3612049d41edf18cb533dbfc3b9b427a2 (diff) | |
download | sink-10b356ff0e015f41c346a72286382ccfc2302d8d.tar.gz sink-10b356ff0e015f41c346a72286382ccfc2302d8d.zip |
Convert ResultSet
Diffstat (limited to 'common/resultset.cpp')
-rw-r--r-- | common/resultset.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/resultset.cpp b/common/resultset.cpp index 08954c9..88110e1 100644 --- a/common/resultset.cpp +++ b/common/resultset.cpp | |||
@@ -20,6 +20,8 @@ | |||
20 | 20 | ||
21 | #include "log.h" | 21 | #include "log.h" |
22 | 22 | ||
23 | using Sink::Storage::Identifier; | ||
24 | |||
23 | ResultSet::ResultSet() : mIt(nullptr) | 25 | ResultSet::ResultSet() : mIt(nullptr) |
24 | { | 26 | { |
25 | } | 27 | } |
@@ -32,7 +34,7 @@ ResultSet::ResultSet(const IdGenerator &generator) : mIt(nullptr), mGenerator(ge | |||
32 | { | 34 | { |
33 | } | 35 | } |
34 | 36 | ||
35 | ResultSet::ResultSet(const QVector<QByteArray> &resultSet) | 37 | ResultSet::ResultSet(const QVector<Identifier> &resultSet) |
36 | : mResultSet(resultSet), | 38 | : mResultSet(resultSet), |
37 | mIt(mResultSet.constBegin()), | 39 | mIt(mResultSet.constBegin()), |
38 | mSkip([this]() { | 40 | mSkip([this]() { |
@@ -114,11 +116,11 @@ ResultSet::ReplayResult ResultSet::replaySet(int offset, int batchSize, const Ca | |||
114 | return {counter, false}; | 116 | return {counter, false}; |
115 | } | 117 | } |
116 | 118 | ||
117 | QByteArray ResultSet::id() | 119 | Identifier ResultSet::id() |
118 | { | 120 | { |
119 | if (mIt) { | 121 | if (mIt) { |
120 | if (mIt == mResultSet.constEnd()) { | 122 | if (mIt == mResultSet.constEnd()) { |
121 | return QByteArray(); | 123 | return {}; |
122 | } | 124 | } |
123 | Q_ASSERT(mIt != mResultSet.constEnd()); | 125 | Q_ASSERT(mIt != mResultSet.constEnd()); |
124 | return *mIt; | 126 | return *mIt; |