diff options
author | Rechi <Rechi@users.noreply.github.com> | 2020-10-30 18:53:28 +0000 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2020-10-30 18:53:28 +0000 |
commit | 893e8aef53a2dd3e9086bd852cb99c2ff5a6896c (patch) | |
tree | fc08ae9e1fcaee550ed2d5a8167eb9eb9f48d4c7 | |
parent | 5466b730fdc6ad591f6292e0a37efd50f53ecb40 (diff) |
[clang-tidy] performance-move-const-arg
-rw-r--r-- | xbmc/Application.cpp | 2 | ||||
-rw-r--r-- | xbmc/addons/AddonManager.cpp | 2 | ||||
-rw-r--r-- | xbmc/addons/Scraper.cpp | 2 | ||||
-rw-r--r-- | xbmc/addons/addoninfo/AddonInfoBuilder.cpp | 2 | ||||
-rw-r--r-- | xbmc/addons/addoninfo/AddonInfoBuilder.h | 4 | ||||
-rw-r--r-- | xbmc/cores/RetroPlayer/guicontrols/GUIGameControl.cpp | 2 | ||||
-rw-r--r-- | xbmc/cores/RetroPlayer/guicontrols/GUIRenderSettings.cpp | 2 | ||||
-rw-r--r-- | xbmc/dialogs/GUIDialogPlayEject.cpp | 4 | ||||
-rw-r--r-- | xbmc/input/JoystickMapper.cpp | 2 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/ListItem.cpp | 2 | ||||
-rw-r--r-- | xbmc/peripherals/addons/PeripheralAddon.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/Variant.cpp | 2 | ||||
-rw-r--r-- | xbmc/video/VideoInfoTag.cpp | 4 |
13 files changed, 16 insertions, 16 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index b1d02c2790..d6399014b1 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1932,7 +1932,7 @@ bool CApplication::OnAction(const CAction &action) if (!player.empty()) { item.m_lStartOffset = CUtil::ConvertSecsToMilliSecs(GetTime()); - PlayFile(std::move(item), player, true); + PlayFile(item, player, true); } } else diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index f557635c4c..4a68eab7c0 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -544,7 +544,7 @@ void CAddonMgr::SortByDependencies(VECADDONS& updates) const // add to the end of sorted list of addons if (addToSortedList) { - sorted.emplace_back(std::move(addon)); + sorted.emplace_back(addon); it = updates.erase(it); } else diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp index 22e0feafe4..f348051ecc 100644 --- a/xbmc/addons/Scraper.cpp +++ b/xbmc/addons/Scraper.cpp @@ -836,7 +836,7 @@ template<> void DetailsFromFileItem<CVideoInfoTag>(const CFileItem &item, CVideoInfoTag &tag) { if (item.HasVideoInfoTag()) - tag = std::move(*item.GetVideoInfoTag()); + tag = *item.GetVideoInfoTag(); } template<class T> diff --git a/xbmc/addons/addoninfo/AddonInfoBuilder.cpp b/xbmc/addons/addoninfo/AddonInfoBuilder.cpp index 75b61105f6..b9013b6fbf 100644 --- a/xbmc/addons/addoninfo/AddonInfoBuilder.cpp +++ b/xbmc/addons/addoninfo/AddonInfoBuilder.cpp @@ -46,7 +46,7 @@ AddonInfoPtr CAddonInfoBuilder::Generate(const std::string& id, TYPE type) } AddonInfoPtr addon = std::make_shared<CAddonInfo>(); - addon->m_id = std::move(id); + addon->m_id = id; addon->m_mainType = type; return addon; } diff --git a/xbmc/addons/addoninfo/AddonInfoBuilder.h b/xbmc/addons/addoninfo/AddonInfoBuilder.h index 2fe4c3e974..34e52c647e 100644 --- a/xbmc/addons/addoninfo/AddonInfoBuilder.h +++ b/xbmc/addons/addoninfo/AddonInfoBuilder.h @@ -51,8 +51,8 @@ public: } void SetPath(std::string path) { m_addonInfo->m_path = std::move(path); } void SetLibName(std::string libname) { m_addonInfo->m_libname = std::move(libname); } - void SetVersion(AddonVersion version) { m_addonInfo->m_version = std::move(version); } - void SetMinVersion(AddonVersion minversion) { m_addonInfo->m_minversion = std::move(minversion); } + void SetVersion(AddonVersion version) { m_addonInfo->m_version = version; } + void SetMinVersion(AddonVersion minversion) { m_addonInfo->m_minversion = minversion; } void SetDependencies(std::vector<DependencyInfo> dependencies) { m_addonInfo->m_dependencies = std::move(dependencies); } void SetExtrainfo(InfoMap extrainfo) { diff --git a/xbmc/cores/RetroPlayer/guicontrols/GUIGameControl.cpp b/xbmc/cores/RetroPlayer/guicontrols/GUIGameControl.cpp index 0deed3b3fe..7d720ad851 100644 --- a/xbmc/cores/RetroPlayer/guicontrols/GUIGameControl.cpp +++ b/xbmc/cores/RetroPlayer/guicontrols/GUIGameControl.cpp @@ -150,7 +150,7 @@ void CGUIGameControl::UpdateInfo(const CGUIListItem* item /* = nullptr */) if (StringUtils::IsNaturalNumber(strRotation)) { unsigned int rotation; - std::istringstream(std::move(strRotation)) >> rotation; + std::istringstream(strRotation) >> rotation; m_renderSettings->SetRotationDegCCW(rotation); m_bHasRotation = true; } diff --git a/xbmc/cores/RetroPlayer/guicontrols/GUIRenderSettings.cpp b/xbmc/cores/RetroPlayer/guicontrols/GUIRenderSettings.cpp index 478905ffd8..9dee726c05 100644 --- a/xbmc/cores/RetroPlayer/guicontrols/GUIRenderSettings.cpp +++ b/xbmc/cores/RetroPlayer/guicontrols/GUIRenderSettings.cpp @@ -58,7 +58,7 @@ void CGUIRenderSettings::SetSettings(CRenderSettings settings) { CSingleLock lock(m_mutex); - m_renderSettings = std::move(settings); + m_renderSettings = settings; } void CGUIRenderSettings::SetDimensions(const CRect& dimensions) diff --git a/xbmc/dialogs/GUIDialogPlayEject.cpp b/xbmc/dialogs/GUIDialogPlayEject.cpp index d34b5ebe3c..094c58386c 100644 --- a/xbmc/dialogs/GUIDialogPlayEject.cpp +++ b/xbmc/dialogs/GUIDialogPlayEject.cpp @@ -87,8 +87,8 @@ bool CGUIDialogPlayEject::ShowAndGetInput(const std::string strLine1, // Setup dialog parameters pDialog->SetHeading(CVariant{219}); pDialog->SetLine(0, CVariant{429}); - pDialog->SetLine(1, CVariant{std::move(strLine1)}); - pDialog->SetLine(2, CVariant{std::move(strLine2)}); + pDialog->SetLine(1, CVariant{strLine1}); + pDialog->SetLine(2, CVariant{strLine2}); pDialog->SetChoice(ID_BUTTON_PLAY - 10, 208); pDialog->SetChoice(ID_BUTTON_EJECT - 10, 13391); if (uiAutoCloseTime) diff --git a/xbmc/input/JoystickMapper.cpp b/xbmc/input/JoystickMapper.cpp index 631f68062d..233238dbd3 100644 --- a/xbmc/input/JoystickMapper.cpp +++ b/xbmc/input/JoystickMapper.cpp @@ -136,7 +136,7 @@ bool CJoystickMapper::DeserializeButton(const TiXmlElement* pButton, std::string strHoldTime; if (pButton->QueryValueAttribute(JOYSTICK_XML_ATTR_HOLDTIME, &strHoldTime) == TIXML_SUCCESS) { - std::istringstream ss(std::move(strHoldTime)); + std::istringstream ss(strHoldTime); ss >> holdtimeMs; } diff --git a/xbmc/interfaces/legacy/ListItem.cpp b/xbmc/interfaces/legacy/ListItem.cpp index f73df260bb..501e7b466f 100644 --- a/xbmc/interfaces/legacy/ListItem.cpp +++ b/xbmc/interfaces/legacy/ListItem.cpp @@ -620,7 +620,7 @@ namespace XBMCAddon for (const auto& genreEntry: alt.later()) { const String& genre = genreEntry.which() == first ? genreEntry.former() : genreEntry.later().first(); - genres.emplace_back(std::move(genre)); + genres.emplace_back(genre); } gametag.SetGenres(genres); diff --git a/xbmc/peripherals/addons/PeripheralAddon.cpp b/xbmc/peripherals/addons/PeripheralAddon.cpp index e02df0f298..89656ed339 100644 --- a/xbmc/peripherals/addons/PeripheralAddon.cpp +++ b/xbmc/peripherals/addons/PeripheralAddon.cpp @@ -563,7 +563,7 @@ bool CPeripheralAddon::GetFeatures(const CPeripheral* device, { kodi::addon::JoystickFeature feature(pFeatures[i]); if (feature.Type() != JOYSTICK_FEATURE_TYPE_UNKNOWN) - features[feature.Name()] = std::move(feature); + features[feature.Name()] = feature; } m_struct.toAddon->free_features(&m_struct, featureCount, pFeatures); diff --git a/xbmc/utils/Variant.cpp b/xbmc/utils/Variant.cpp index 97676f6e90..d6cf0d6e84 100644 --- a/xbmc/utils/Variant.cpp +++ b/xbmc/utils/Variant.cpp @@ -634,7 +634,7 @@ CVariant& CVariant::operator=(CVariant&& rhs) cleanup(); m_type = rhs.m_type; - m_data = std::move(rhs.m_data); + m_data = rhs.m_data; //Should be enough to just set m_type here //but better safe than sorry, could probably lead to coverity warnings diff --git a/xbmc/video/VideoInfoTag.cpp b/xbmc/video/VideoInfoTag.cpp index a36f138458..5537bc7639 100644 --- a/xbmc/video/VideoInfoTag.cpp +++ b/xbmc/video/VideoInfoTag.cpp @@ -1392,14 +1392,14 @@ void CVideoInfoTag::SetVotes(int votes, const std::string& type /* = "" */) void CVideoInfoTag::SetPremiered(CDateTime premiered) { - m_premiered = std::move(premiered); + m_premiered = premiered; m_bHasPremiered = premiered.IsValid(); } void CVideoInfoTag::SetPremieredFromDBDate(std::string premieredString) { CDateTime premiered; - premiered.SetFromDBDate(std::move(premieredString)); + premiered.SetFromDBDate(premieredString); SetPremiered(premiered); } |