diff --git a/daemon/daemon.cc b/daemon/daemon.cc index fc8e3442cb699d984854ac507a6bf7501b19c852..c4dd918ca94f17720804180137986744467fc90c 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -285,7 +285,7 @@ DaemonCommand::DaemonCommand(const string &name, const string &proto, const stri } void DaemonCommand::addExample(std::unique_ptr<const DaemonCommandExample> &&example) { - mExamples.emplace_back(move(example)); + mExamples.emplace_back(std::move(example)); } const string DaemonCommand::getHelp() const { diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index 97585aab58f2e03de1d129f9698d8ff59ddc8546..5f8826920263d85f3922ccda38a8ddb8f5c1b842 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -462,7 +462,7 @@ ClientGroupChatRoom::ClientGroupChatRoom(const shared_ptr<Core> &core, Participant::create(getConference().get(), peerAddress); static_pointer_cast<RemoteConference>(getConference())->focus->addDevice(peerAddress); static_pointer_cast<RemoteConference>(getConference())->focus->setFocus(true); - getConference()->participants = move(newParticipants); + getConference()->participants = std::move(newParticipants); setConferenceId(conferenceId); static_pointer_cast<RemoteConference>(getConference())->confParams->setConferenceAddress(peerAddress); diff --git a/src/chat/chat-room/server-group-chat-room.cpp b/src/chat/chat-room/server-group-chat-room.cpp index 9470d294246e28256ed5480abd2d88d3ff120569..ce126c4631a72849e947af7ffbdba10585c46659 100644 --- a/src/chat/chat-room/server-group-chat-room.cpp +++ b/src/chat/chat-room/server-group-chat-room.cpp @@ -1419,7 +1419,7 @@ ServerGroupChatRoom::ServerGroupChatRoom(const shared_ptr<Core> &core, params, make_shared<LocalConference>(core, peerAddress, nullptr, ConferenceParams::create(core->getCCore()), this)) { L_D(); - cachedParticipants = move(participants); + cachedParticipants = std::move(participants); getConference()->setLastNotify(lastNotifyId); getConference()->setConferenceId(ConferenceId(peerAddress, peerAddress)); getConference()->confParams->setConferenceAddress(peerAddress); diff --git a/src/chat/encryption/lime-x3dh-encryption-engine.cpp b/src/chat/encryption/lime-x3dh-encryption-engine.cpp index d59303ac2e698fb819dcc29f891a95a774f9704a..346465407824e8d932f500b61c131905ca2d9c97 100644 --- a/src/chat/encryption/lime-x3dh-encryption-engine.cpp +++ b/src/chat/encryption/lime-x3dh-encryption-engine.cpp @@ -295,7 +295,7 @@ ChatMessageModifier::Result LimeX3dhEncryptionEngine::processOutgoingMessage(con // Replaces SIPFRAG since version 4.4.0 CpimChatMessageModifier ccmm; Content *cpimContent = ccmm.createMinimalCpimContentForLimeMessage(message); - contents.push_back(move(cpimContent)); + contents.push_back(std::move(cpimContent)); // ---------------------------------------------- SIPFRAG @@ -303,7 +303,7 @@ ChatMessageModifier::Result LimeX3dhEncryptionEngine::processOutgoingMessage(con Content *sipfrag = new Content(); sipfrag->setBodyFromLocale("From: <" + localDeviceId + ">"); sipfrag->setContentType(ContentType::SipFrag); - contents.push_back(move(sipfrag)); + contents.push_back(std::move(sipfrag)); // ---------------------------------------------- HEADERS @@ -315,7 +315,7 @@ ChatMessageModifier::Result LimeX3dhEncryptionEngine::processOutgoingMessage(con cipherHeader->addHeader("Content-Id", recipient.deviceId); Header contentDescription("Content-Description", "Cipher key"); cipherHeader->addHeader(contentDescription); - contents.push_back(move(cipherHeader)); + contents.push_back(std::move(cipherHeader)); } // ---------------------------------------------- MESSAGE @@ -326,7 +326,7 @@ ChatMessageModifier::Result LimeX3dhEncryptionEngine::processOutgoingMessage(con cipherMessage->setBodyFromLocale(cipherMessageB64); cipherMessage->setContentType(ContentType::OctetStream); cipherMessage->addHeader("Content-Description", "Encrypted message"); - contents.push_back(move(cipherMessage)); + contents.push_back(std::move(cipherMessage)); Content finalContent = ContentManager::contentListToMultipart(contents, true); diff --git a/src/chat/notification/imdn.cpp b/src/chat/notification/imdn.cpp index 5961bfdcf0bd2331dee76aabec9d57fcc2f44ee5..b0c6581c567563ed3e263529b19c1a3dfd6f11a7 100644 --- a/src/chat/notification/imdn.cpp +++ b/src/chat/notification/imdn.cpp @@ -223,7 +223,7 @@ void Imdn::parse(const shared_ptr<ChatMessage> &chatMessage) { if (!imdn) continue; messagesIds.push_back(imdn->getMessageId()); - imdns.push_back(move(imdn)); + imdns.push_back(std::move(imdn)); } // It seems to be more efficient to only make one database request to get all chat messages from their IMDN message diff --git a/src/conference/handlers/local-conference-list-event-handler.cpp b/src/conference/handlers/local-conference-list-event-handler.cpp index bc23f9257c92d4daa86e783697fd251c7c35a56d..15a0c85422b302e84f90c32f734c45ecffff8221 100644 --- a/src/conference/handlers/local-conference-list-event-handler.cpp +++ b/src/conference/handlers/local-conference-list-event-handler.cpp @@ -159,7 +159,7 @@ void LocalConferenceListEventHandler::subscribeReceived(const std::shared_ptr<Ev belle_sip_random_token(token, sizeof(token)); content.addHeader("Content-Id", token); content.addHeader("Content-Length", Utils::toString(content.getSize())); - contents.push_back(move(content)); + contents.push_back(std::move(content)); // Add entry into the Rlmi content of the notify body Xsd::Rlmi::Resource resource(addr.asStringUriOnly()); diff --git a/src/conference/params/call-session-params.cpp b/src/conference/params/call-session-params.cpp index 1f427fb847d698b913a66b052795f17a0a41e413..43f7c1fa53abc0ca07e096955c5149e39cbc4463 100644 --- a/src/conference/params/call-session-params.cpp +++ b/src/conference/params/call-session-params.cpp @@ -304,7 +304,7 @@ std::string CallSessionParams::getCustomContactParameter(const std::string ¶ void CallSessionParams::addCustomContent(const Content &content) { L_D(); - d->customContents.push_back(move(content)); + d->customContents.push_back(std::move(content)); } const list<Content> &CallSessionParams::getCustomContents() const { diff --git a/src/content/content.cpp b/src/content/content.cpp index d1872c7d1b92d601018204c12e5ed2975b59bb9f..7194c33b6452e6de4c1b5f45456e571566d727c5 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -48,14 +48,14 @@ Content::Content(const Content &other) : ClonableObject(*new ContentPrivate), Ap copy(other); } -Content::Content(Content &&other) : ClonableObject(*new ContentPrivate), AppDataContainer(move(other)) { +Content::Content(Content &&other) : ClonableObject(*new ContentPrivate), AppDataContainer(std::move(other)) { L_D(); ContentPrivate *dOther = other.getPrivate(); - d->body = move(dOther->body); - d->contentType = move(dOther->contentType); - d->contentDisposition = move(dOther->contentDisposition); - d->contentEncoding = move(dOther->contentEncoding); - d->headers = move(dOther->headers); + d->body = std::move(dOther->body); + d->contentType = std::move(dOther->contentType); + d->contentDisposition = std::move(dOther->contentDisposition); + d->contentEncoding = std::move(dOther->contentEncoding); + d->headers = std::move(dOther->headers); } Content::Content(ContentPrivate &p) : ClonableObject(p) { @@ -80,13 +80,13 @@ Content &Content::operator=(const Content &other) { Content &Content::operator=(Content &&other) { L_D(); - AppDataContainer::operator=(move(other)); + AppDataContainer::operator=(std::move(other)); ContentPrivate *dOther = other.getPrivate(); - d->body = move(dOther->body); - d->contentType = move(dOther->contentType); - d->contentDisposition = move(dOther->contentDisposition); - d->contentEncoding = move(dOther->contentEncoding); - d->headers = move(dOther->headers); + d->body = std::move(dOther->body); + d->contentType = std::move(dOther->contentType); + d->contentDisposition = std::move(dOther->contentDisposition); + d->contentEncoding = std::move(dOther->contentEncoding); + d->headers = std::move(dOther->headers); return *this; } @@ -163,7 +163,7 @@ void Content::setBody(const vector<char> &body) { void Content::setBody(vector<char> &&body) { L_D(); - d->body = move(body); + d->body = std::move(body); } void Content::setBodyFromLocale(const string &body) { diff --git a/src/content/file-content.cpp b/src/content/file-content.cpp index 3dac5af1d4f6693d2ec3266870fb7bd79aa3f855..d25ce2bfec36a85fce463441b4017a3b621be83a 100644 --- a/src/content/file-content.cpp +++ b/src/content/file-content.cpp @@ -60,10 +60,10 @@ FileContent::FileContent(const FileContent &other) : Content(*new FileContentPri FileContent::FileContent(FileContent &&other) : Content(*new FileContentPrivate) { L_D(); Content::copy(other); - d->fileName = move(other.getPrivate()->fileName); - d->filePath = move(other.getPrivate()->filePath); - d->fileSize = move(other.getPrivate()->fileSize); - d->fileDuration = move(other.getPrivate()->fileDuration); + d->fileName = std::move(other.getPrivate()->fileName); + d->filePath = std::move(other.getPrivate()->filePath); + d->fileSize = std::move(other.getPrivate()->fileSize); + d->fileDuration = std::move(other.getPrivate()->fileDuration); } FileContent &FileContent::operator=(const FileContent &other) { @@ -78,11 +78,11 @@ FileContent &FileContent::operator=(const FileContent &other) { FileContent &FileContent::operator=(FileContent &&other) { L_D(); - Content::operator=(move(other)); - d->fileName = move(other.getPrivate()->fileName); - d->filePath = move(other.getPrivate()->filePath); - d->fileSize = move(other.getPrivate()->fileSize); - d->fileDuration = move(other.getPrivate()->fileDuration); + Content::operator=(std::move(other)); + d->fileName = std::move(other.getPrivate()->fileName); + d->filePath = std::move(other.getPrivate()->filePath); + d->fileSize = std::move(other.getPrivate()->fileSize); + d->fileDuration = std::move(other.getPrivate()->fileDuration); return *this; } diff --git a/src/content/file-transfer-content.cpp b/src/content/file-transfer-content.cpp index e616a2cf24a76446c267fab2ddadfdb4b38e18ae..d9f2bf5acdc42058f3c4afc765abde69d0d321bc 100644 --- a/src/content/file-transfer-content.cpp +++ b/src/content/file-transfer-content.cpp @@ -78,15 +78,15 @@ FileTransferContent::FileTransferContent(const FileTransferContent &other) : Con FileTransferContent::FileTransferContent(FileTransferContent &&other) : Content(*new FileTransferContentPrivate) { L_D(); Content::copy(other); - d->fileName = move(other.getPrivate()->fileName); - d->fileUrl = move(other.getPrivate()->fileUrl); - d->filePath = move(other.getPrivate()->filePath); - d->fileContent = move(other.getPrivate()->fileContent); - d->fileSize = move(other.getPrivate()->fileSize); - d->fileKey = move(other.getPrivate()->fileKey); - d->fileAuthTag = move(other.getPrivate()->fileAuthTag); - d->fileContentType = move(other.getPrivate()->fileContentType); - d->fileDuration = move(other.getPrivate()->fileDuration); + d->fileName = std::move(other.getPrivate()->fileName); + d->fileUrl = std::move(other.getPrivate()->fileUrl); + d->filePath = std::move(other.getPrivate()->filePath); + d->fileContent = std::move(other.getPrivate()->fileContent); + d->fileSize = std::move(other.getPrivate()->fileSize); + d->fileKey = std::move(other.getPrivate()->fileKey); + d->fileAuthTag = std::move(other.getPrivate()->fileAuthTag); + d->fileContentType = std::move(other.getPrivate()->fileContentType); + d->fileDuration = std::move(other.getPrivate()->fileDuration); } FileTransferContent &FileTransferContent::operator=(const FileTransferContent &other) { @@ -109,16 +109,16 @@ FileTransferContent &FileTransferContent::operator=(const FileTransferContent &o FileTransferContent &FileTransferContent::operator=(FileTransferContent &&other) { L_D(); - Content::operator=(move(other)); - d->fileName = move(other.getPrivate()->fileName); - d->fileUrl = move(other.getPrivate()->fileUrl); - d->filePath = move(other.getPrivate()->filePath); - d->fileContent = move(other.getPrivate()->fileContent); - d->fileSize = move(other.getPrivate()->fileSize); - d->fileKey = move(other.getPrivate()->fileKey); - d->fileAuthTag = move(other.getPrivate()->fileAuthTag); - d->fileContentType = move(other.getPrivate()->fileContentType); - d->fileDuration = move(other.getPrivate()->fileDuration); + Content::operator=(std::move(other)); + d->fileName = std::move(other.getPrivate()->fileName); + d->fileUrl = std::move(other.getPrivate()->fileUrl); + d->filePath = std::move(other.getPrivate()->filePath); + d->fileContent = std::move(other.getPrivate()->fileContent); + d->fileSize = std::move(other.getPrivate()->fileSize); + d->fileKey = std::move(other.getPrivate()->fileKey); + d->fileAuthTag = std::move(other.getPrivate()->fileAuthTag); + d->fileContentType = std::move(other.getPrivate()->fileContentType); + d->fileDuration = std::move(other.getPrivate()->fileDuration); return *this; } diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index d45d473effdcdf27cff44744a8ab7f8821769e86..52e28276b5e371076e743dbb7aadc93f045a7c2a 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -4506,8 +4506,8 @@ list<shared_ptr<AbstractChatRoom>> MainDb::getChatRooms() const { continue; } shared_ptr<ClientGroupChatRoom> clientGroupChatRoom(new ClientGroupChatRoom( - core, conferenceId, me, capabilities, params, Utils::utf8ToLocale(subject), move(participants), - lastNotifyId, hasBeenLeft)); + core, conferenceId, me, capabilities, params, Utils::utf8ToLocale(subject), + std::move(participants), lastNotifyId, hasBeenLeft)); chatRoom = clientGroupChatRoom; conference = clientGroupChatRoom->getConference().get(); chatRoom->setState(ConferenceInterface::State::Instantiated); @@ -4537,7 +4537,7 @@ list<shared_ptr<AbstractChatRoom>> MainDb::getChatRooms() const { } else { auto serverGroupChatRoom = std::make_shared<ServerGroupChatRoom>(core, conferenceId.getPeerAddress(), capabilities, params, - subject, move(participants), lastNotifyId); + subject, std::move(participants), lastNotifyId); chatRoom = serverGroupChatRoom; conference = serverGroupChatRoom->getConference().get(); chatRoom->setState(ConferenceInterface::State::Instantiated); diff --git a/src/object/app-data-container.cpp b/src/object/app-data-container.cpp index 1bac412d3a29d169cc072e599e129c6ea4b98a22..9a8eea95a724a2dd4852090ef32113708e6f679a 100644 --- a/src/object/app-data-container.cpp +++ b/src/object/app-data-container.cpp @@ -75,7 +75,7 @@ void AppDataContainer::setAppData(const string &name, const string &appData) { void AppDataContainer::setAppData(const string &name, string &&appData) { L_D(); - (*d->appData)[name] = move(appData); + (*d->appData)[name] = std::move(appData); } LINPHONE_END_NAMESPACE diff --git a/src/object/property-container.cpp b/src/object/property-container.cpp index 4ae510d4f1cef89270c26ee8cd9458bae47d9b74..ed0f186cd1d435a40185fdf53d43ea8afc1ded57 100644 --- a/src/object/property-container.cpp +++ b/src/object/property-container.cpp @@ -71,7 +71,7 @@ void PropertyContainer::setProperty(const string &name, const Variant &value) { void PropertyContainer::setProperty(const string &name, Variant &&value) { if (!mPrivate) mPrivate = new PropertyContainerPrivate(); - mPrivate->properties[name] = move(value); + mPrivate->properties[name] = std::move(value); } int PropertyContainer::remove(const std::string &name) const { diff --git a/src/sal/call-op.cpp b/src/sal/call-op.cpp index f21a5381a8cbd4e0e929a669dfbf34c8f4f3e21e..ab6b1957aec7f1f8a7191c03e7216d7bab7a207f 100644 --- a/src/sal/call-op.cpp +++ b/src/sal/call-op.cpp @@ -60,7 +60,7 @@ int SalCallOp::setLocalMediaDescription(std::shared_ptr<SalMediaDescription> des if (error != BELLE_SIP_OK) return -1; mLocalBody.setContentType(ContentType::Sdp); - mLocalBody.setBody(move(buffer)); + mLocalBody.setBody(std::move(buffer)); } else { mLocalBody = Content(); } @@ -81,7 +81,7 @@ int SalCallOp::setLocalMediaDescription(std::shared_ptr<SalMediaDescription> des int SalCallOp::setLocalBody(const Content &body) { Content bodyCopy = body; - return setLocalBody(move(bodyCopy)); + return setLocalBody(std::move(bodyCopy)); } int SalCallOp::setLocalBody(Content &&body) { @@ -100,12 +100,12 @@ int SalCallOp::setLocalBody(Content &&body) { mLocalMedia = desc; } - mLocalBody = move(body); + mLocalBody = std::move(body); return 0; } void SalCallOp::addAdditionalLocalBody(const Content &content) { - mAdditionalLocalBodies.push_back(move(content)); + mAdditionalLocalBodies.push_back(std::move(content)); } const list<Content> &SalCallOp::getAdditionalRemoteBodies() const { @@ -179,7 +179,7 @@ int SalCallOp::setSdp(belle_sip_message_t *msg, belle_sdp_session_description_t Content body; body.setContentType(ContentType::Sdp); - body.setBody(move(buffer)); + body.setBody(std::move(buffer)); setCustomBody(msg, body); return 0; } @@ -439,7 +439,7 @@ void SalCallOp::handleBodyFromResponse(belle_sip_response_t *response) { if (content.getContentType() == ContentType::Sdp) { sdpBody = content; } else { - mAdditionalRemoteBodies.push_back(move(content)); + mAdditionalRemoteBodies.push_back(std::move(content)); } } } @@ -451,14 +451,14 @@ void SalCallOp::handleBodyFromResponse(belle_sip_response_t *response) { if (sdp) { mRemoteMedia = std::make_shared<SalMediaDescription>(sdp); - mRemoteBody = move(sdpBody); + mRemoteBody = std::move(sdpBody); belle_sip_object_unref(sdp); } // If no SDP in response, what can we do? } // Process sdp in any case to reset result media description if (mLocalMedia) sdpProcess(); } else { - mRemoteBody = move(sdpBody); + mRemoteBody = std::move(sdpBody); } } @@ -755,7 +755,7 @@ SalReason SalCallOp::processBodyForInvite(belle_sip_request_t *invite) { if (content.getContentType() == ContentType::Sdp) { sdpBody = content; } else { - mAdditionalRemoteBodies.push_back(move(content)); + mAdditionalRemoteBodies.push_back(std::move(content)); } } } @@ -781,7 +781,7 @@ SalReason SalCallOp::processBodyForInvite(belle_sip_request_t *invite) { sal_error_info_reset(&sei); } } - mRemoteBody = move(sdpBody); + mRemoteBody = std::move(sdpBody); return reason; } @@ -797,7 +797,7 @@ SalReason SalCallOp::processBodyForAck(belle_sip_request_t *ack) { if (content.getContentType() == ContentType::Sdp) { sdpBody = content; } else { - mAdditionalRemoteBodies.push_back(move(content)); + mAdditionalRemoteBodies.push_back(std::move(content)); } } } @@ -814,7 +814,7 @@ SalReason SalCallOp::processBodyForAck(belle_sip_request_t *ack) { } } } - mRemoteBody = move(sdpBody); + mRemoteBody = std::move(sdpBody); return reason; } diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 6b6aa8e03636f6d7ad6b64bc16ab804f83ea5f62..88d54a8511f99dc38f3f92ee4f07adde85d916ce 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -453,7 +453,7 @@ int logfile_arg_func(const char *arg) { return 0; } -void liblinphone_tester_add_suites() { +void liblinphone_tester_add_suites(void) { bc_tester_add_suite(&setup_test_suite); bc_tester_add_suite(®ister_test_suite); #ifdef HAVE_ADVANCED_IM diff --git a/tester/local_conference_tester.cpp b/tester/local_conference_tester.cpp index d9c79f4d688fafbf779d180f0805062ba0d6f6dc..3e9895798afd6ed2239c1316154cb35f80be75f4 100644 --- a/tester/local_conference_tester.cpp +++ b/tester/local_conference_tester.cpp @@ -4573,7 +4573,6 @@ static void wait_for_conference_streams(std::initializer_list<std::reference_wra bool call_ok = true; if (mgr == focus) { - int counter = 0; for (auto m : members) { LinphoneCall *pcall = linphone_core_get_call_by_remote_address2(m->lc, confAddr); call_ok &= (pcall != nullptr); @@ -4584,8 +4583,6 @@ static void wait_for_conference_streams(std::initializer_list<std::reference_wra } else { calls.push_back(nullptr); } - // Increment counter - counter++; } } else { LinphoneCall *call = linphone_core_get_call_by_remote_address2(mgr->lc, confAddr); @@ -4597,7 +4594,6 @@ static void wait_for_conference_streams(std::initializer_list<std::reference_wra } } - int counter = 0; call_ok &= (calls.size() > 0); LinphoneConference *conference = linphone_core_search_conference_2(mgr->lc, confAddr); for (auto call : calls) { @@ -4610,7 +4606,6 @@ static void wait_for_conference_streams(std::initializer_list<std::reference_wra (linphone_call_get_state(call) == LinphoneCallStateStreamsRunning)); } // Increment counter - counter++; } if (calls.front()) { @@ -7337,7 +7332,6 @@ static void create_conference_with_codec_mismatch_base(bool_t organizer_codec_mi } } - int idx = 1; for (auto mgr : members) { BC_ASSERT_TRUE(wait_for_list(coresList, &mgr->stat.number_of_LinphoneCallOutgoingProgress, 1, 10000)); int no_streams_running = 3; @@ -7368,8 +7362,6 @@ static void create_conference_with_codec_mismatch_base(bool_t organizer_codec_mi const LinphoneMediaEncryption ccall_enc = linphone_call_params_get_media_encryption(call_cparams); BC_ASSERT_EQUAL(ccall_enc, encryption, int, "%d"); } - - idx++; } BC_ASSERT_TRUE(wait_for_list(coresList, &focus.getStats().number_of_LinphoneCallIncomingReceived,