There is also a "for-each loop" (also known as ranged-based for loop), which is used to loop through elements in an array (or other data structures):Syntax for (type variableName : arrayName) { // code block to
However, it's better to write theranged based for looplike this: // access memory location of elements of numfor(int&var : num) {// code} Notice the use of&beforevar. Here, int var : num- Copies each element ofnumto thevarvariable in each iteration. This is not good for computer...
But afaik, the problem is tracing calls across TUs, so for the (likely) case where the loop contains a call to an out-of-TU function, a clang-based modernizer couldn't give a go for porting to ranged-for, because that out-of-TU call could re-enter into the current TU and cause ...
>78% of fire autoattacking isn't really all that impressive when fire also has three additional damage skills (and elementalist design, including staff, is generally based on spending as little time autoattacking as possible), and potentially adds burning as well while air is straight power dama...