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/API/FIRFirestore.mm | |
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/API/FIRFirestore.mm')
-rw-r--r-- | Firestore/Source/API/FIRFirestore.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm index 0ed9082..3671b51 100644 --- a/Firestore/Source/API/FIRFirestore.mm +++ b/Firestore/Source/API/FIRFirestore.mm @@ -32,7 +32,6 @@ #import "Firestore/Source/API/FIRWriteBatch+Internal.h" #import "Firestore/Source/API/FSTUserDataConverter.h" #import "Firestore/Source/Core/FSTFirestoreClient.h" -#import "Firestore/Source/Util/FSTAssert.h" #import "Firestore/Source/Util/FSTDispatchQueue.h" #import "Firestore/Source/Util/FSTUsageValidation.h" @@ -41,6 +40,7 @@ #include "Firestore/core/src/firebase/firestore/core/database_info.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" +#include "Firestore/core/src/firebase/firestore/util/hard_assert.h" #include "Firestore/core/src/firebase/firestore/util/log.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "absl/memory/memory.h" @@ -158,7 +158,7 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; FIRFirestore *firestore = instances[key]; if (!firestore) { NSString *projectID = app.options.projectID; - FSTAssert(projectID, @"FirebaseOptions.projectID cannot be nil."); + HARD_ASSERT(projectID, "FirebaseOptions.projectID cannot be nil."); FSTDispatchQueue *workerDispatchQueue = [FSTDispatchQueue queueWith:dispatch_queue_create("com.google.firebase.firestore", DISPATCH_QUEUE_SERIAL)]; @@ -242,8 +242,8 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; @synchronized(self) { if (!_client) { // These values are validated elsewhere; this is just double-checking: - FSTAssert(_settings.host, @"FirestoreSettings.host cannot be nil."); - FSTAssert(_settings.dispatchQueue, @"FirestoreSettings.dispatchQueue cannot be nil."); + HARD_ASSERT(_settings.host, "FirestoreSettings.host cannot be nil."); + HARD_ASSERT(_settings.dispatchQueue, "FirestoreSettings.dispatchQueue cannot be nil."); if (!_settings.timestampsInSnapshotsEnabled) { LOG_WARN( |