aboutsummaryrefslogtreecommitdiff
path: root/src/clientmap.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/clientmap.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/clientmap.cpp')
-rw-r--r--src/clientmap.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 3c9a6c7f4..d0e08fdbf 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -274,8 +274,8 @@ struct MeshBufListList
void clear()
{
- for (int l = 0; l < MAX_TILE_LAYERS; l++)
- lists[l].clear();
+ for (auto &list : lists)
+ list.clear();
}
void add(scene::IMeshBuffer *buf, u8 layer)
@@ -441,9 +441,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
}
// Render all layers in order
- for (int layer = 0; layer < MAX_TILE_LAYERS; layer++) {
- std::vector<MeshBufList> &lists = drawbufs.lists[layer];
-
+ for (auto &lists : drawbufs.lists) {
int timecheck_counter = 0;
for (MeshBufList &list : lists) {
timecheck_counter++;