aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2024-07-02 21:49:24 +0200
committerGitHub <noreply@github.com>2024-07-02 21:49:24 +0200
commitfbeb00dfe8d53b702fffb2d7c86f0a2e0c00e083 (patch)
tree1605165844ff22cae78a46134f8a013aee149fdd
parentfb90b04e8d65c929499157cc99ec23351db7c6ff (diff)
parenta0d63a5af10b06b04490c86bfc25baf186776303 (diff)
Merge pull request #25392 from Rechi/clang-tidy/performance
[clang-tidy] fix modernize-* and performance-* warnings
-rw-r--r--xbmc/pvr/channels/PVRChannelGroups.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xbmc/pvr/channels/PVRChannelGroups.cpp b/xbmc/pvr/channels/PVRChannelGroups.cpp
index 79a5283eb9..c6539b7533 100644
--- a/xbmc/pvr/channels/PVRChannelGroups.cpp
+++ b/xbmc/pvr/channels/PVRChannelGroups.cpp
@@ -79,7 +79,7 @@ void CPVRChannelGroups::Unload()
m_groups.clear();
m_allChannelsGroup.reset();
- m_channelGroupFactory.reset(new CPVRChannelGroupFactory);
+ m_channelGroupFactory = std::make_shared<CPVRChannelGroupFactory>();
m_failedClientsForChannelGroups.clear();
}
@@ -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;
}