diff --git a/src/CBLCollection.cc b/src/CBLCollection.cc index ce96b49c..d63dc0ad 100644 --- a/src/CBLCollection.cc +++ b/src/CBLCollection.cc @@ -108,7 +108,7 @@ namespace cbl_internal { Retained CBLCollection::addChangeListener(CBLCollectionChangeListener listener, void* _cbl_nullable ctx) { - auto lock =_c4col.useLocked(); // Ensure the database lifetime while creating the Listener oken + auto lock =_c4col.useLocked(); // Ensure the database lifetime while creating the Listener token auto token = addListener([&] { return new ListenerToken(this, listener, ctx); }); _listeners.add((ListenerToken*)token.get()); return token; @@ -118,7 +118,7 @@ Retained CBLCollection::addDocumentListener(slice docID, CBLCollectionDocumentChangeListener listener, void* _cbl_nullable ctx) { - auto lock =_c4col.useLocked(); // // Ensure the database lifetime while creating the Listener oken + auto lock =_c4col.useLocked(); // // Ensure the database lifetime while creating the Listener token auto token = new ListenerToken(this, docID, listener, ctx); _docListeners.add(token); return token; diff --git a/src/CBLReplicatorConfig.hh b/src/CBLReplicatorConfig.hh index 3c1e42aa..178405ef 100644 --- a/src/CBLReplicatorConfig.hh +++ b/src/CBLReplicatorConfig.hh @@ -184,11 +184,11 @@ namespace cbl_internal // Throw an exception if the validation failed: validate(); - CBLCollection* defaultCollection = nullptr; + Retained defaultCollection = nullptr; if (database) { // This can technically throw if the default collection doesn't exist (We don't allow now). // So call first before copying anything: - defaultCollection = database->getDefaultCollection(true).get(); + defaultCollection = database->getDefaultCollection(true); } if (endpoint) { @@ -229,7 +229,7 @@ namespace cbl_internal collections = _effectiveCollections.data(); } else { // Create a replication collection using the default collection: - assert(defaultCollection != nullptr); + assert(defaultCollection); CBLReplicationCollection col {}; col.collection = defaultCollection; col.conflictResolver = conflictResolver; diff --git a/test/ReplicatorEETest.cc b/test/ReplicatorEETest.cc index 5536a8ec..9df29abd 100644 --- a/test/ReplicatorEETest.cc +++ b/test/ReplicatorEETest.cc @@ -639,7 +639,6 @@ TEST_CASE_METHOD(ReplicatorLocalTest, "DocIDs Pull Filters", "[Replicator]") { FLMutableArray_Release(docIDs); } - class ReplicatorFilterTest : public ReplicatorLocalTest { public: int count = 0;