078a9affa0
Iterating over it returns each side number in turn. This allows converting many loops of the form: ``` for (int i = 0; i < MAX_SIDES_PER_SEGMENT; ++i) ``` to the compact form: ``` for (const auto i : MAX_SIDES_PER_SEGMENT) ``` The compact form brings the usual benefit of range-based for: delegating iteration to the compiler prevents the loop body from skipping a step, and makes clear in the code that this is the case. |
||
---|---|---|
.. | ||
ai.cpp | ||
aipath.cpp | ||
automap.cpp | ||
bm.cpp | ||
bmread.cpp | ||
cntrlcen.cpp | ||
collide.cpp | ||
config.cpp | ||
console.cpp | ||
controls.cpp | ||
credits.cpp | ||
digiobj.cpp | ||
dumpmine.cpp | ||
effects.cpp | ||
endlevel.cpp | ||
fireball.cpp | ||
fuelcen.cpp | ||
fvi.cpp | ||
game.cpp | ||
gamecntl.cpp | ||
gamefont.cpp | ||
gamemine.cpp | ||
gamerend.cpp | ||
gamesave.cpp | ||
gameseg.cpp | ||
gameseq.cpp | ||
gauges.cpp | ||
generate-kconfig-udlr.py | ||
hostage.cpp | ||
hud.cpp | ||
iff.cpp | ||
inferno.cpp | ||
kconfig.cpp | ||
kconfig.ui-table.cpp | ||
kmatrix.cpp | ||
laser.cpp | ||
lighting.cpp | ||
menu.cpp | ||
mglobal.cpp | ||
mission.cpp | ||
morph.cpp | ||
multi.cpp | ||
multibot.cpp | ||
net_udp.cpp | ||
newdemo.cpp | ||
newmenu.cpp | ||
object.cpp | ||
paging.cpp | ||
physics.cpp | ||
piggy.cpp | ||
player.cpp | ||
playsave.cpp | ||
polyobj.cpp | ||
powerup.cpp | ||
render.cpp | ||
robot.cpp | ||
scores.cpp | ||
segment.cpp | ||
slew.cpp | ||
songs.cpp | ||
state.cpp | ||
switch.cpp | ||
terrain.cpp | ||
texmerge.cpp | ||
text.cpp | ||
titles.cpp | ||
vclip.cpp | ||
vers_id.cpp | ||
wall.cpp | ||
weapon.cpp |