aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-20 19:37:29 +0200
committerGitHub <noreply@github.com>2017-08-20 19:37:29 +0200
commitae9b5e00989756bb676429530dfe81039009001c (patch)
tree119c9ac4b886c24d42f418e21e4175a942eb95ff /src/mapblock_mesh.cpp
parentc8d3d1133945138108aa195e6b3c93b07c6e4fa0 (diff)
downloadminetest-ae9b5e00989756bb676429530dfe81039009001c.tar.gz
minetest-ae9b5e00989756bb676429530dfe81039009001c.tar.bz2
minetest-ae9b5e00989756bb676429530dfe81039009001c.zip
Modernize code: very last fixes (#6290)
Last modernization fixes
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r--src/mapblock_mesh.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index f2f013cbc..0980d6ecd 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1325,11 +1325,8 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat
scene::IMeshBuffer *buf = m_mesh[daynight_diff.first.first]->
getMeshBuffer(daynight_diff.first.second);
video::S3DVertex *vertices = (video::S3DVertex *)buf->getVertices();
- for (auto j = daynight_diff.second.begin();
- j != daynight_diff.second.end(); ++j)
- {
- final_color_blend(&(vertices[j->first].Color),
- j->second, day_color);
+ for (const auto &j : daynight_diff.second) {
+ final_color_blend(&(vertices[j.first].Color), j.second, day_color);
}
}
m_last_daynight_ratio = daynight_ratio;