mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Fix Clazy range-loop-detach warnings
This commit is contained in:
@@ -261,7 +261,7 @@ void SdlInputHandler::raiseAllKeys()
|
||||
"Raising %d keys",
|
||||
(int)m_KeysDown.count());
|
||||
|
||||
for (auto keyDown : m_KeysDown) {
|
||||
for (auto keyDown : std::as_const(m_KeysDown)) {
|
||||
LiSendKeyboardEvent(keyDown, KEY_ACTION_UP, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1596,7 +1596,7 @@ bool Session::startConnectionAsync()
|
||||
// the chosen resolution. Avoid that by disabling SOPS when it
|
||||
// is not streaming a supported resolution.
|
||||
enableGameOptimizations = false;
|
||||
for (const NvDisplayMode &mode : m_Computer->displayModes) {
|
||||
for (const NvDisplayMode &mode : std::as_const(m_Computer->displayModes)) {
|
||||
if (mode.width == m_StreamConfig.width &&
|
||||
mode.height == m_StreamConfig.height) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
{
|
||||
int value = 0;
|
||||
|
||||
for (const int & v : *this) {
|
||||
for (const int v : *this) {
|
||||
value |= v;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ void Pacer::handleVsync(int timeUntilNextVsyncMillis)
|
||||
// frame history to drop frames only if consistently above the
|
||||
// one queued frame mark.
|
||||
if (m_MaxVideoFps >= m_DisplayFps) {
|
||||
for (int queueHistoryEntry : m_PacingQueueHistory) {
|
||||
for (int queueHistoryEntry : std::as_const(m_PacingQueueHistory)) {
|
||||
if (queueHistoryEntry <= 1) {
|
||||
// Be lenient as long as the queue length
|
||||
// resolves before the end of frame history
|
||||
@@ -360,7 +360,7 @@ void Pacer::renderFrame(AVFrame* frame)
|
||||
}
|
||||
else {
|
||||
frameDropTarget = 0;
|
||||
for (int queueHistoryEntry : m_RenderQueueHistory) {
|
||||
for (int queueHistoryEntry : std::as_const(m_RenderQueueHistory)) {
|
||||
if (queueHistoryEntry == 0) {
|
||||
// Be lenient as long as the queue length
|
||||
// resolves before the end of frame history
|
||||
|
||||
Reference in New Issue
Block a user