diff options
author | Gil <mcg@google.com> | 2018-05-24 11:00:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 11:00:23 -0700 |
commit | 8037a4bf79b8ae49162c2b6f099d62ec17a7f283 (patch) | |
tree | 5a15df8664abbcf3e63479fa3e7560fd8c2fbe9e /Firestore/Source/Local/FSTPersistence.h | |
parent | de4fe203525072babcdec444a06e42e77f0aa714 (diff) |
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
Diffstat (limited to 'Firestore/Source/Local/FSTPersistence.h')
-rw-r--r-- | Firestore/Source/Local/FSTPersistence.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 <Foundation/Foundation.h> #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<std::is_void<decltype(block())>::value, void>::type { __strong id<FSTTransactional> 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<FSTTransactional> 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]; |