Skip to content

Commit

Permalink
Optimize range-based loops using auto&
Browse files Browse the repository at this point in the history
Suggested by clang.
  • Loading branch information
lmoureaux committed Dec 31, 2023
1 parent 8dd2b7e commit f94d883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void renderer::unqueue_updates()
} else {
QRectF to_update;

for (const auto [tile, upd_types] : updates) {
for (const auto [type, rect] : rects) {
for (const auto &[tile, upd_types] : updates) {
for (const auto &[type, rect] : rects) {
if (upd_types & type) {
float xl, yt;
(void) tile_to_canvas_pos(&xl, &yt, tile);
Expand Down

0 comments on commit f94d883

Please sign in to comment.