MantisBT - Doomseeker
View Issue Details
0003807Doomseeker[All Projects] Cleanuppublic2020-06-07 03:292020-06-07 19:47
WubTheCaptain 
 
nonetweaksometimes
confirmedopen 
1.3.1 
 
0003807: Some for(...; ...; ...) loops are not range-based loops (C++11), but C-style
Most of Doomseeker is written in C++, but there are for loops that are C-style (inherited from C++98).

Let's modernize to C++11 and beyond?
$ grep -r "for (" src/ | wc -l
968
$ grep -r "for (" src/ | grep "&" | grep ":" | wc -l
283
$ grep -r "for(" src/ | wc -l
16


The ones with "for(" were all third-party dependencies, however. Not accounting for any C files, if there are any.
'https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html [^]'
No tags attached.
child of 0003803confirmed  C++11 support 
Issue History
2020-06-07 03:29WubTheCaptainNew Issue
2020-06-07 03:29WubTheCaptainRelationship addedchild of 0003803
2020-06-07 03:29WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13121#r13121
2020-06-07 03:31WubTheCaptainReproducibilityhave not tried => sometimes
2020-06-07 19:46Pol MNote Added: 0021379
2020-06-07 19:47Pol MStatusnew => confirmed

Notes
(0021379)
Pol M   
2020-06-07 19:46   
Sure, no problem. That said, sometimes c-style for loops are necessary, so don't be surprised if we can't simply use them everywhere.