diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-06 13:01:57 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-06 13:01:57 +0200 |
commit | b4341b9ba3f0242ff95fb229a80b4143c1369c34 (patch) | |
tree | 67de1bc8f4bdda0c20325fa0f8a0bdd81fdd8aa9 /common/storage_common.cpp | |
parent | 78bda48f1f09f5a1e03ddd612751ce6abf5b0dd9 (diff) | |
download | sink-b4341b9ba3f0242ff95fb229a80b4143c1369c34.tar.gz sink-b4341b9ba3f0242ff95fb229a80b4143c1369c34.zip |
Asserts in methods where we always expect a result.
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 5d787d8..264f223 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -127,6 +127,7 @@ QByteArray DataStore::getUidFromRevision(const DataStore::Transaction &transacti | |||
127 | return false; | 127 | return false; |
128 | }, | 128 | }, |
129 | [revision](const Error &error) { SinkWarning() << "Couldn't find uid for revision: " << revision << error.message; }); | 129 | [revision](const Error &error) { SinkWarning() << "Couldn't find uid for revision: " << revision << error.message; }); |
130 | Q_ASSERT(!uid.isEmpty()); | ||
130 | return uid; | 131 | return uid; |
131 | } | 132 | } |
132 | 133 | ||
@@ -140,6 +141,7 @@ QByteArray DataStore::getTypeFromRevision(const DataStore::Transaction &transact | |||
140 | return false; | 141 | return false; |
141 | }, | 142 | }, |
142 | [revision](const Error &error) { SinkWarning() << "Couldn't find type for revision " << revision; }); | 143 | [revision](const Error &error) { SinkWarning() << "Couldn't find type for revision " << revision; }); |
144 | Q_ASSERT(!type.isEmpty()); | ||
143 | return type; | 145 | return type; |
144 | } | 146 | } |
145 | 147 | ||