From b4341b9ba3f0242ff95fb229a80b4143c1369c34 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 6 Aug 2018 13:01:57 +0200 Subject: Asserts in methods where we always expect a result. --- common/storage_common.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 return false; }, [revision](const Error &error) { SinkWarning() << "Couldn't find uid for revision: " << revision << error.message; }); + Q_ASSERT(!uid.isEmpty()); return uid; } @@ -140,6 +141,7 @@ QByteArray DataStore::getTypeFromRevision(const DataStore::Transaction &transact return false; }, [revision](const Error &error) { SinkWarning() << "Couldn't find type for revision " << revision; }); + Q_ASSERT(!type.isEmpty()); return type; } -- cgit v1.2.3