Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the code built with xcode15 #519

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CBLBlob_CAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
6 changes: 3 additions & 3 deletions src/CBLDatabase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Retained<CBLScope> CBLDatabase::getScope(slice scopeName) {
if (!scope && exist) {
auto retainedScope = make_retained<CBLScope>(scopeName, this);
scope = retainedScope.get();
_scopes.insert({scope->name(), move(retainedScope)});
_scopes.insert({scope->name(), std::move(retainedScope)});
}

return scope;
Expand All @@ -201,7 +201,7 @@ Retained<CBLCollection> 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
Expand Down Expand Up @@ -289,7 +289,7 @@ Retained<CBLCollection> CBLDatabase::createCBLCollection(C4Collection* c4col, CB
auto retainedCollection = make_retained<CBLCollection>(c4col, scope, const_cast<CBLDatabase*>(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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CBLDocument.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/CBLQuery_CAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion src/ConflictResolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void NotificationQueue::setCallback(CBLNotificationsReadyCallback callback, void
auto pending = _state.useLocked<Notifications>([&](State &state) {
state.callback = callback;
state.context = context;
return callback ? nullptr : move(state.queue);
return callback ? nullptr : std::move(state.queue);
});
call(pending);
}
Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions test/DatabaseTest_Cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions test/QueryTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion test/QueryTest_Cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
Loading