Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
This commit is contained in:
@@ -1480,7 +1480,7 @@ void ViewportSign::MarkDirty(ZoomLevel maxzoom) const
|
||||
zoomlevels[zoom].bottom = this->top + ScaleByZoom(VPSM_TOP + FONT_HEIGHT_NORMAL + VPSM_BOTTOM + 1, zoom);
|
||||
}
|
||||
|
||||
for (const Window *w : Window::IterateFromBack()) {
|
||||
for (const Window *w : Window::Iterate()) {
|
||||
Viewport *vp = w->viewport;
|
||||
if (vp != nullptr && vp->zoom <= maxzoom) {
|
||||
assert(vp->width != 0);
|
||||
@@ -1953,7 +1953,7 @@ bool MarkAllViewportsDirty(int left, int top, int right, int bottom)
|
||||
{
|
||||
bool dirty = false;
|
||||
|
||||
for (const Window *w : Window::IterateFromBack()) {
|
||||
for (const Window *w : Window::Iterate()) {
|
||||
Viewport *vp = w->viewport;
|
||||
if (vp != nullptr) {
|
||||
assert(vp->width != 0);
|
||||
@@ -1966,7 +1966,7 @@ bool MarkAllViewportsDirty(int left, int top, int right, int bottom)
|
||||
|
||||
void ConstrainAllViewportsZoom()
|
||||
{
|
||||
for (Window *w : Window::IterateFromFront()) {
|
||||
for (Window *w : Window::Iterate()) {
|
||||
if (w->viewport == nullptr) continue;
|
||||
|
||||
ZoomLevel zoom = static_cast<ZoomLevel>(Clamp(w->viewport->zoom, _settings_client.gui.zoom_min, _settings_client.gui.zoom_max));
|
||||
|
Reference in New Issue
Block a user