Skip to content

Commit

Permalink
tidy: Modernize a couple of "display" loops.
Browse files Browse the repository at this point in the history
Convert these loops to the "new" c++11 range-based loops.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
  • Loading branch information
linuxdude42 committed Nov 3, 2021
1 parent c5819a0 commit 9a0e0dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/platforms/mythdisplaydrm.cpp
Expand Up @@ -153,8 +153,8 @@ const MythDisplayModes& MythDisplayDRM::GetVideoModes()
m_modeMap.insert(MythDisplayMode::CalcKey(resolution, rate), mode->m_index);
}

for (auto it = screenmap.begin(); screenmap.end() != it; ++it)
m_videoModes.push_back(it->second);
for (auto & it : screenmap)
m_videoModes.push_back(it.second);

DebugModes();
return m_videoModes;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/platforms/mythdisplaymutter.cpp
Expand Up @@ -334,8 +334,8 @@ const MythDisplayModes& MythDisplayMutter::GetVideoModes()
m_modeMap.insert(MythDisplayMode::CalcKey(resolution, rate), mmode.id);
}

for (auto it = screenmap.begin(); screenmap.end() != it; ++it)
m_videoModes.push_back(it->second);
for (auto & it : screenmap)
m_videoModes.push_back(it.second);

DebugModes();
return m_videoModes;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/platforms/mythdisplayx11.cpp
Expand Up @@ -165,8 +165,8 @@ const MythDisplayModes& MythDisplayX11::GetVideoModes()
}
}

for (auto it = screenmap.begin(); screenmap.end() != it; ++it)
m_videoModes.push_back(it->second);
for (auto & it : screenmap)
m_videoModes.push_back(it.second);

DebugModes();
XRRFreeOutputInfo(output);
Expand Down

0 comments on commit 9a0e0dd

Please sign in to comment.