Skip to content

Commit 96f8b6a

Browse files
committed
UI: Use C++11 ranged-for instead of Q_FOREACH
Qt has been porting uses of Q_FOREACH/foreach to C++11's ranged-for. Let's do the same. References: * https://doc.qt.io/qt-6/foreach-keyword.html * https://codereview.qt-project.org/q/Q_FOREACH
1 parent 0866688 commit 96f8b6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

UI/window-basic-main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10882,9 +10882,11 @@ void OBSBasic::CheckDiskSpaceRemaining()
1088210882

1088310883
void OBSBasic::ResetStatsHotkey()
1088410884
{
10885-
QList<OBSBasicStats *> list = findChildren<OBSBasicStats *>();
10885+
const QList<OBSBasicStats *> list = findChildren<OBSBasicStats *>();
1088610886

10887-
foreach(OBSBasicStats * s, list) s->Reset();
10887+
for (OBSBasicStats *s : list) {
10888+
s->Reset();
10889+
}
1088810890
}
1088910891

1089010892
void OBSBasic::on_OBSBasic_customContextMenuRequested(const QPoint &pos)

0 commit comments

Comments
 (0)