diff --git a/src/CBLBlob_CAPI.cc b/src/CBLBlob_CAPI.cc index 00569d1a..e894e85a 100644 --- a/src/CBLBlob_CAPI.cc +++ b/src/CBLBlob_CAPI.cc @@ -108,7 +108,7 @@ CBLBlob* CBLBlob_CreateWithStream(FLString contentType, CBLBlobWriteStream* writer) noexcept { try { - return retain(new CBLNewBlob(contentType, move(*writer))); + return retain(new CBLNewBlob(contentType, std::move(*writer))); } catchAndWarn() } diff --git a/src/CBLDatabase.cc b/src/CBLDatabase.cc index 0eb77177..9821d25d 100644 --- a/src/CBLDatabase.cc +++ b/src/CBLDatabase.cc @@ -175,7 +175,7 @@ Retained CBLDatabase::getScope(slice scopeName) { if (!scope && exist) { auto retainedScope = make_retained(scopeName, this); scope = retainedScope.get(); - _scopes.insert({scope->name(), move(retainedScope)}); + _scopes.insert({scope->name(), std::move(retainedScope)}); } return scope; @@ -201,7 +201,7 @@ Retained CBLDatabase::getCollection(slice collectionName, slice s return collection; } - auto c4col = c4db->getCollection(spec); + C4Collection* c4col = c4db->getCollection(spec); if (!c4col) { if (collection) { removeCBLCollection(spec); // Invalidate cache @@ -289,7 +289,7 @@ Retained CBLDatabase::createCBLCollection(C4Collection* c4col, CB auto retainedCollection = make_retained(c4col, scope, const_cast(this)); auto collection = retainedCollection.get(); if (cache) { - _collections.insert({C4Database::CollectionSpec(c4col->getSpec()), move(retainedCollection)}); + _collections.insert({C4Database::CollectionSpec(c4col->getSpec()), std::move(retainedCollection)}); } return collection; } diff --git a/src/CBLDocument.cc b/src/CBLDocument.cc index ae7b2d85..b2650a3d 100644 --- a/src/CBLDocument.cc +++ b/src/CBLDocument.cc @@ -144,7 +144,7 @@ bool CBLDocument::save(CBLCollection* collection, const SaveOptions &opt) { t.commit(); _collection = collection; // HACK: Replace the inner reference of the c4doc with the one from newDoc. - c4doc.get() = move(newDoc); + c4doc.get() = std::move(newDoc); _revID = c4doc->selectedRev().revID; success = true; } else { diff --git a/src/CBLQuery_CAPI.cc b/src/CBLQuery_CAPI.cc index 6d0f3c49..47d4e81f 100644 --- a/src/CBLQuery_CAPI.cc +++ b/src/CBLQuery_CAPI.cc @@ -36,7 +36,7 @@ CBLQuery* CBLDatabase_CreateQuery(const CBLDatabase* db, C4Error::set(LiteCoreDomain, kC4ErrorInvalidQuery, {}, internal(outError)); return nullptr; } - return move(query).detach(); + return std::move(query).detach(); } catchAndBridge(outError) } diff --git a/src/ConflictResolver.cc b/src/ConflictResolver.cc index 55cf887a..a62eef86 100644 --- a/src/ConflictResolver.cc +++ b/src/ConflictResolver.cc @@ -61,7 +61,7 @@ namespace cbl_internal { :_collection(collection) ,_clientResolver(customResolver) ,_clientResolverContext(context) - ,_docID(move(docID)) + ,_docID(std::move(docID)) { //SyncLog(Info, "ConflictResolver %p on %.*s", this, _docID.c_str()); } diff --git a/src/Listener.cc b/src/Listener.cc index 4e0a2ee1..dd2c1718 100644 --- a/src/Listener.cc +++ b/src/Listener.cc @@ -40,7 +40,7 @@ void NotificationQueue::setCallback(CBLNotificationsReadyCallback callback, void auto pending = _state.useLocked([&](State &state) { state.callback = callback; state.context = context; - return callback ? nullptr : move(state.queue); + return callback ? nullptr : std::move(state.queue); }); call(pending); } @@ -74,7 +74,7 @@ void NotificationQueue::add(Notification notification) { void NotificationQueue::notifyAll() { - auto queue = move(_state.useLocked()->queue); + auto queue = std::move(_state.useLocked()->queue); call(queue); } diff --git a/test/DatabaseTest_Cpp.cc b/test/DatabaseTest_Cpp.cc index 2637368e..94182644 100644 --- a/test/DatabaseTest_Cpp.cc +++ b/test/DatabaseTest_Cpp.cc @@ -458,7 +458,7 @@ TEST_CASE_METHOD(CBLTest_Cpp, "Listener Token") { CHECK(listenerToken.token() == listener); // Move Constructor: - ListenerToken<> listenerToken2 = move(listenerToken); + ListenerToken<> listenerToken2 = std::move(listenerToken); REQUIRE(listenerToken2.context()); (*(ListenerToken<>::Callback*)listenerToken2.context())(); CHECK(num == 2); @@ -471,7 +471,7 @@ TEST_CASE_METHOD(CBLTest_Cpp, "Listener Token") { #endif // Move Assignment: - listenerToken = move(listenerToken2); + listenerToken = std::move(listenerToken2); REQUIRE(listenerToken.context()); (*(ListenerToken<>::Callback*)listenerToken.context())(); CHECK(num == 3); diff --git a/test/QueryTest.cc b/test/QueryTest.cc index 43d83cf1..6fe107d6 100644 --- a/test/QueryTest.cc +++ b/test/QueryTest.cc @@ -509,7 +509,7 @@ TEST_CASE_METHOD(QueryTest, "Query Listener", "[Query][LiveQuery]") { cerr << "Adding listener\n"; ListenerState state; - auto listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { + CBLListenerToken* listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { ((ListenerState*)context)->receivedCallback(context, query, token); }, &state); @@ -547,7 +547,7 @@ TEST_CASE_METHOD(QueryTest, "Remove Query Listener", "[Query][LiveQuery]") { cerr << "Adding listener\n"; ListenerState state; - auto listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { + CBLListenerToken* listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { ((ListenerState*)context)->receivedCallback(context, query, token); }, &state); @@ -589,7 +589,7 @@ TEST_CASE_METHOD(QueryTest, "Query Listener and Changing parameters", "[Query][L cerr << "Adding listener\n"; ListenerState state; - auto listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { + CBLListenerToken* listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { ((ListenerState*)context)->receivedCallback(context, query, token); }, &state); @@ -627,10 +627,10 @@ TEST_CASE_METHOD(QueryTest, "Multiple Query Listeners", "[Query][LiveQuery]") { cerr << "Adding listener\n"; ListenerState state1; - auto token1 = CBLQuery_AddChangeListener(query, callback, &state1); + CBLListenerToken* token1 = CBLQuery_AddChangeListener(query, callback, &state1); ListenerState state2; - auto token2 = CBLQuery_AddChangeListener(query, callback, &state2); + CBLListenerToken* token2 = CBLQuery_AddChangeListener(query, callback, &state2); cerr << "Waiting for listener 1...\n"; state1.waitForCount(1); @@ -658,7 +658,7 @@ TEST_CASE_METHOD(QueryTest, "Multiple Query Listeners", "[Query][LiveQuery]") { cerr << "Adding another listener\n"; ListenerState state3; - auto token3 = CBLQuery_AddChangeListener(query, callback, &state3); + CBLListenerToken* token3 = CBLQuery_AddChangeListener(query, callback, &state3); cerr << "Waiting for the listener 3...\n"; state3.waitForCount(1); @@ -688,7 +688,7 @@ TEST_CASE_METHOD(QueryTest, "Query Listener and Coalescing notification", "[Quer cerr << "Adding listener\n"; ListenerState state; - auto listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { + CBLListenerToken* listenerToken = CBLQuery_AddChangeListener(query, [](void *context, CBLQuery* query, CBLListenerToken* token) { ((ListenerState*)context)->receivedCallback(context, query, token); }, &state); diff --git a/test/QueryTest_Cpp.cc b/test/QueryTest_Cpp.cc index 9e6a30a4..688a6759 100644 --- a/test/QueryTest_Cpp.cc +++ b/test/QueryTest_Cpp.cc @@ -164,7 +164,7 @@ TEST_CASE_METHOD(QueryTest_Cpp, "Query Listener C++ Move Operation", "[Query][Qu resultCount = -1; // Move constructor: - Query::ChangeListener listenerToken2 = move(listenerToken); + Query::ChangeListener listenerToken2 = std::move(listenerToken); CHECK(listenerToken2.context()); CHECK(listenerToken2.token());