diff options
author | Rechi <Rechi@users.noreply.github.com> | 2024-07-01 10:44:24 +1000 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2024-07-01 10:44:24 +1000 |
commit | a0d63a5af10b06b04490c86bfc25baf186776303 (patch) | |
tree | 1605165844ff22cae78a46134f8a013aee149fdd | |
parent | 907181bbdf74b186d41a7d3ac62dcd2f7bac8a6d (diff) |
[clang-tidy] performance-unnecessary-copy-initialization
-rw-r--r-- | xbmc/pvr/channels/PVRChannelGroups.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xbmc/pvr/channels/PVRChannelGroups.cpp b/xbmc/pvr/channels/PVRChannelGroups.cpp index 65055c7e5b..c6539b7533 100644 --- a/xbmc/pvr/channels/PVRChannelGroups.cpp +++ b/xbmc/pvr/channels/PVRChannelGroups.cpp @@ -468,7 +468,7 @@ std::shared_ptr<CPVRChannelGroup> CPVRChannelGroups::GetLastGroup() const std::unique_lock<CCriticalSection> lock(m_critSection); for (auto it = m_groups.crbegin(); it != m_groups.crend(); ++it) { - const auto group{*it}; + const auto& group{*it}; if (!group->ShouldBeIgnored(m_groups)) return group; } @@ -548,7 +548,7 @@ std::shared_ptr<CPVRChannelGroup> CPVRChannelGroups::GetPreviousGroup( std::unique_lock<CCriticalSection> lock(m_critSection); for (auto it = m_groups.crbegin(); it != m_groups.crend(); ++it) { - const auto currentGroup{*it}; + const auto& currentGroup{*it}; // return this entry if (bReturnNext && !currentGroup->IsHidden() && !currentGroup->ShouldBeIgnored(m_groups)) @@ -562,7 +562,7 @@ std::shared_ptr<CPVRChannelGroup> CPVRChannelGroups::GetPreviousGroup( // no match return last visible group for (auto it = m_groups.crbegin(); it != m_groups.crend(); ++it) { - const auto currentGroup{*it}; + const auto& currentGroup{*it}; if (!currentGroup->IsHidden() && !currentGroup->ShouldBeIgnored(m_groups)) return currentGroup; } @@ -581,7 +581,7 @@ std::shared_ptr<CPVRChannelGroup> CPVRChannelGroups::GetNextGroup( std::unique_lock<CCriticalSection> lock(m_critSection); for (auto it = m_groups.cbegin(); it != m_groups.cend(); ++it) { - const auto currentGroup{*it}; + const auto& currentGroup{*it}; // return this entry if (bReturnNext && !currentGroup->IsHidden() && !currentGroup->ShouldBeIgnored(m_groups)) @@ -595,7 +595,7 @@ std::shared_ptr<CPVRChannelGroup> CPVRChannelGroups::GetNextGroup( // no match return first visible group for (auto it = m_groups.cbegin(); it != m_groups.cend(); ++it) { - const auto currentGroup{*it}; + const auto& currentGroup{*it}; if (!currentGroup->IsHidden() && !currentGroup->ShouldBeIgnored(m_groups)) return currentGroup; } |