From 8037a4bf79b8ae49162c2b6f099d62ec17a7f283 Mon Sep 17 00:00:00 2001 From: Gil Date: Thu, 24 May 2018 11:00:23 -0700 Subject: Replace Objective-C assertions with C++ assertions (#1327) * Migrate FSTFail to HARD_FAIL * FSTCFail -> HARD_FAIL * FSTCAssert -> HARD_ASSERT * FSTAssert -> HARD_ASSERT * Replace FSTAssert with NSAssert in dead Objective-C code * Remove FSTAssert.h --- Firestore/Source/Local/FSTPersistence.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Firestore/Source/Local/FSTPersistence.h') diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index 417ff3f..a2ce76f 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -17,8 +17,9 @@ #import #import "Firestore/Source/Core/FSTTypes.h" -#import "Firestore/Source/Util/FSTAssert.h" + #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @class FSTDocumentKey; @protocol FSTMutationQueue; @@ -181,7 +182,7 @@ struct FSTTransactionRunner { typename std::enable_if::value, void>::type { __strong id strongDb = _db; if (!strongDb && _expect_db) { - FSTCFail(@"Transaction runner accessed without underlying db when it expected one"); + HARD_FAIL("Transaction runner accessed without underlying db when it expected one"); } if (strongDb) { [strongDb startTransaction:label]; @@ -198,7 +199,7 @@ struct FSTTransactionRunner { using ReturnT = decltype(block()); __strong id strongDb = _db; if (!strongDb && _expect_db) { - FSTCFail(@"Transaction runner accessed without underlying db when it expected one"); + HARD_FAIL("Transaction runner accessed without underlying db when it expected one"); } if (strongDb) { [strongDb startTransaction:label]; -- cgit v1.2.3