From 416d21df36bd2487ac6174943542f9489759ca0c Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Mon, 21 Sep 2020 14:32:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E5=8E=BB=E9=99=A4st?= =?UTF-8?q?d::move?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdpart/ZLToolKit | 2 +- api/source/mk_events_objects.cpp | 2 +- api/source/mk_httpclient.cpp | 2 +- server/WebApi.cpp | 2 +- server/WebHook.cpp | 2 +- src/Common/MediaSink.cpp | 2 +- src/Http/HttpBody.cpp | 4 ++-- src/Http/HttpFileManager.cpp | 2 +- src/Player/PlayerBase.cpp | 2 +- src/Record/MP4Demuxer.cpp | 2 +- src/Rtsp/Rtsp.cpp | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index 311bee0a..8611e88c 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit 311bee0aeff620f51bf43149b001c62079f40ea7 +Subproject commit 8611e88c2eda178973662dcfe180691ff1d8ba35 diff --git a/api/source/mk_events_objects.cpp b/api/source/mk_events_objects.cpp index d078845b..6ce06679 100644 --- a/api/source/mk_events_objects.cpp +++ b/api/source/mk_events_objects.cpp @@ -256,7 +256,7 @@ static C get_http_header( const char *response_header[]){ } break; } - return std::move(header); + return header; } API_EXPORT mk_http_body API_CALL mk_http_body_from_multi_form(const char *key_val[],const char *file_path){ diff --git a/api/source/mk_httpclient.cpp b/api/source/mk_httpclient.cpp index 93c9dd3a..dbafa55a 100755 --- a/api/source/mk_httpclient.cpp +++ b/api/source/mk_httpclient.cpp @@ -78,7 +78,7 @@ static C get_http_header( const char *response_header[]){ } break; } - return std::move(header); + return header; } API_EXPORT void API_CALL mk_http_requester_set_body(mk_http_requester ctx, mk_http_body body){ diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 8f2a8f7a..be3db75b 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -144,7 +144,7 @@ static ApiArgsType getAllArgs(const Parser &parser) { for (auto &pr : parser.getUrlArgs()) { allArgs[pr.first] = pr.second; } - return std::move(allArgs); + return allArgs; } static inline void addHttpListener(){ diff --git a/server/WebHook.cpp b/server/WebHook.cpp index f195fff3..e2d1adf1 100644 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -163,7 +163,7 @@ static ArgsType make_json(const MediaInfo &args){ body["app"] = args._app; body["stream"] = args._streamid; body["params"] = args._param_strs; - return std::move(body); + return body; } static void reportServerStarted(){ diff --git a/src/Common/MediaSink.cpp b/src/Common/MediaSink.cpp index acb5e7da..13b9ab40 100644 --- a/src/Common/MediaSink.cpp +++ b/src/Common/MediaSink.cpp @@ -161,7 +161,7 @@ vector MediaSink::getTracks(bool trackReady) const{ } ret.emplace_back(pr.second); } - return std::move(ret); + return ret; } diff --git a/src/Http/HttpBody.cpp b/src/Http/HttpBody.cpp index fb06e19b..9abf523f 100644 --- a/src/Http/HttpBody.cpp +++ b/src/Http/HttpBody.cpp @@ -135,7 +135,7 @@ Buffer::Ptr HttpFileBody::readData(uint32_t size) { //读到数据了 ret->setSize(iRead); _offset += iRead; - return std::move(ret); + return ret; } //读取文件异常,文件真实长度小于声明长度 _offset = _max_size; @@ -146,7 +146,7 @@ Buffer::Ptr HttpFileBody::readData(uint32_t size) { //mmap模式 auto ret = std::make_shared(_map_addr,_offset,size); _offset += size; - return std::move(ret); + return ret; } ////////////////////////////////////////////////////////////////// diff --git a/src/Http/HttpFileManager.cpp b/src/Http/HttpFileManager.cpp index f7c2b5bd..dd2647a1 100644 --- a/src/Http/HttpFileManager.cpp +++ b/src/Http/HttpFileManager.cpp @@ -592,7 +592,7 @@ static string getFilePath(const Parser &parser,const MediaInfo &mediaInfo, TcpSe GET_CONFIG(string, rootPath, Http::kRootPath); auto ret = File::absolutePath(enableVhost ? mediaInfo._vhost + parser.Url() : parser.Url(), rootPath); NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastHttpBeforeAccess, parser, ret, static_cast(sender)); - return std::move(ret); + return ret; } /** diff --git a/src/Player/PlayerBase.cpp b/src/Player/PlayerBase.cpp index ffe54f28..775f38d5 100644 --- a/src/Player/PlayerBase.cpp +++ b/src/Player/PlayerBase.cpp @@ -105,7 +105,7 @@ vector Demuxer::getTracks(bool trackReady) const { ret.emplace_back(_audioTrack); } } - return std::move(ret); + return ret; } float Demuxer::getDuration() const { diff --git a/src/Record/MP4Demuxer.cpp b/src/Record/MP4Demuxer.cpp index 65c4263d..df70ff7d 100644 --- a/src/Record/MP4Demuxer.cpp +++ b/src/Record/MP4Demuxer.cpp @@ -275,7 +275,7 @@ vector MP4Demuxer::getTracks(bool trackReady) const { } ret.push_back(pr.second); } - return std::move(ret); + return ret; } uint64_t MP4Demuxer::getDurationMS() const { diff --git a/src/Rtsp/Rtsp.cpp b/src/Rtsp/Rtsp.cpp index 58944ca8..f63bd30a 100644 --- a/src/Rtsp/Rtsp.cpp +++ b/src/Rtsp/Rtsp.cpp @@ -286,7 +286,7 @@ vector SdpParser::getAvailableTrack() const { continue; } } - return std::move(ret); + return ret; } string SdpParser::toString() const {