diff options
-rw-r--r-- | xbmc/BackgroundInfoLoader.cpp | 4 | ||||
-rw-r--r-- | xbmc/addons/settings/AddonSettings.cpp | 2 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/PlayerGUIInfo.cpp | 6 | ||||
-rw-r--r-- | xbmc/settings/SubtitlesSettings.cpp | 2 | ||||
-rw-r--r-- | xbmc/settings/dialogs/GUIDialogSettingsBase.cpp | 2 | ||||
-rw-r--r-- | xbmc/threads/Condition.h | 5 | ||||
-rw-r--r-- | xbmc/video/dialogs/GUIDialogVideoInfo.cpp | 2 | ||||
-rw-r--r-- | xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp | 2 | ||||
-rw-r--r-- | xbmc/view/GUIViewState.cpp | 2 |
9 files changed, 14 insertions, 13 deletions
diff --git a/xbmc/BackgroundInfoLoader.cpp b/xbmc/BackgroundInfoLoader.cpp index ea03a41238..8235f81096 100644 --- a/xbmc/BackgroundInfoLoader.cpp +++ b/xbmc/BackgroundInfoLoader.cpp @@ -40,7 +40,7 @@ void CBackgroundInfoLoader::Run() // Stage 1: All "fast" stuff we have already cached for (std::vector<CFileItemPtr>::const_iterator iter = m_vecItems.begin(); iter != m_vecItems.end(); ++iter) { - CFileItemPtr pItem = *iter; + const CFileItemPtr& pItem = *iter; // Ask the callback if we should abort if ((m_pProgressCallback && m_pProgressCallback->Abort()) || m_bStop) @@ -62,7 +62,7 @@ void CBackgroundInfoLoader::Run() // Stage 2: All "slow" stuff that we need to lookup for (std::vector<CFileItemPtr>::const_iterator iter = m_vecItems.begin(); iter != m_vecItems.end(); ++iter) { - CFileItemPtr pItem = *iter; + const CFileItemPtr& pItem = *iter; // Ask the callback if we should abort if ((m_pProgressCallback && m_pProgressCallback->Abort()) || m_bStop) diff --git a/xbmc/addons/settings/AddonSettings.cpp b/xbmc/addons/settings/AddonSettings.cpp index 005dc2b140..e89dae4237 100644 --- a/xbmc/addons/settings/AddonSettings.cpp +++ b/xbmc/addons/settings/AddonSettings.cpp @@ -1443,7 +1443,7 @@ bool CAddonSettings::ParseOldCondition(const std::shared_ptr<const CSetting>& se continue; } - SettingConstPtr referencedSetting = settings.at(absoluteSettingIndex); + const SettingConstPtr& referencedSetting = settings.at(absoluteSettingIndex); if (referencedSetting == nullptr) { m_logger->warn( diff --git a/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp b/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp index 52687be47c..8cba69e51f 100644 --- a/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp @@ -661,7 +661,7 @@ std::vector<std::pair<float, float>> CPlayerGUIInfo::GetEditList(const CDataCach { std::vector<std::pair<float, float>> ranges; - const std::vector<EDL::Edit> edits = data.GetEditList(); + const std::vector<EDL::Edit>& edits = data.GetEditList(); for (const auto& edit : edits) { float editStart = edit.start * 100.0f / duration; @@ -694,7 +694,7 @@ std::vector<std::pair<float, float>> CPlayerGUIInfo::GetSceneMarkers(const CData { std::vector<std::pair<float, float>> ranges; - const std::vector<int64_t> scenes = data.GetSceneMarkers(); + const std::vector<int64_t>& scenes = data.GetSceneMarkers(); float lastMarker = 0.0f; for (const auto& scene : scenes) { @@ -712,7 +712,7 @@ std::vector<std::pair<float, float>> CPlayerGUIInfo::GetChapters(const CDataCach { std::vector<std::pair<float, float>> ranges; - const std::vector<std::pair<std::string, int64_t>> chapters = data.GetChapters(); + const std::vector<std::pair<std::string, int64_t>>& chapters = data.GetChapters(); float lastMarker = 0.0f; for (const auto& chapter : chapters) { diff --git a/xbmc/settings/SubtitlesSettings.cpp b/xbmc/settings/SubtitlesSettings.cpp index 25742dd203..dfdc87bee5 100644 --- a/xbmc/settings/SubtitlesSettings.cpp +++ b/xbmc/settings/SubtitlesSettings.cpp @@ -96,7 +96,7 @@ void CSubtitlesSettings::SettingOptionsSubtitleFontsFiller(const SettingConstPtr } } // Add additionals fonts from the user fonts folder - for (std::string familyName : g_fontManager.GetUserFontsFamilyNames()) + for (const std::string& familyName : g_fontManager.GetUserFontsFamilyNames()) { list.emplace_back(familyName, familyName); } diff --git a/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp b/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp index a8e3702413..32d3958845 100644 --- a/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp +++ b/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp @@ -599,7 +599,7 @@ std::set<std::string> CGUIDialogSettingsBase::CreateSettings() for (SettingList::const_iterator settingIt = settings.begin(); settingIt != settings.end(); ++settingIt) { - std::shared_ptr<CSetting> pSetting = *settingIt; + const std::shared_ptr<CSetting>& pSetting = *settingIt; settingMap.insert(pSetting->GetId()); AddSetting(pSetting, group->GetWidth(), iControlID); } diff --git a/xbmc/threads/Condition.h b/xbmc/threads/Condition.h index 0310bbc033..3738352bf2 100644 --- a/xbmc/threads/Condition.h +++ b/xbmc/threads/Condition.h @@ -14,6 +14,7 @@ #include <condition_variable> #include <functional> #include <mutex> +#include <utility> namespace XbmcThreads { @@ -36,7 +37,7 @@ namespace XbmcThreads { int count = lock.count; lock.count = 0; - cond.wait(lock.get_underlying(), predicate); + cond.wait(lock.get_underlying(), std::move(predicate)); lock.count = count; } @@ -72,7 +73,7 @@ namespace XbmcThreads inline void wait(std::unique_lock<CCriticalSection>& lock, std::function<bool()> predicate) { - cond.wait(*lock.mutex(), predicate); + cond.wait(*lock.mutex(), std::move(predicate)); } inline void wait(std::unique_lock<CCriticalSection>& lock) { wait(*lock.mutex()); } diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp index 8065120686..6b97e3d146 100644 --- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp @@ -827,7 +827,7 @@ std::string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem) for (std::vector<std::string>::const_iterator i = artTypes.begin(); i != artTypes.end(); ++i) { - std::string type = *i; + const std::string& type = *i; CFileItemPtr item(new CFileItem(type, false)); if (type == "banner") item->SetLabel(g_localizeStrings.Get(20020)); diff --git a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp index a20837ac99..a8ea583b99 100644 --- a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp +++ b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp @@ -88,7 +88,7 @@ bool CVideoLibraryMarkWatchedJob::Work(CVideoDatabase &db) for (std::vector<CFileItemPtr>::const_iterator iter = markItems.begin(); iter != markItems.end(); ++iter) { - CFileItemPtr item = *iter; + const CFileItemPtr& item = *iter; std::string path(item->GetPath()); if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->GetPath().empty()) diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp index ff99c1baa4..3f8598f267 100644 --- a/xbmc/view/GUIViewState.cpp +++ b/xbmc/view/GUIViewState.cpp @@ -585,7 +585,7 @@ CGUIViewStateFromItems::CGUIViewStateFromItems(const CFileItemList &items) : CGU const std::vector<GUIViewSortDetails> &details = items.GetSortDetails(); for (unsigned int i = 0; i < details.size(); i++) { - const GUIViewSortDetails sort = details[i]; + const GUIViewSortDetails& sort = details[i]; AddSortMethod(sort.m_sortDescription, sort.m_buttonLabel, sort.m_labelMasks); } //! @todo Should default sort/view mode be specified? |