diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-19 14:25:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-19 14:25:35 +0200 |
commit | 7528986e4449febead9b18b6118f0b096f7cf800 (patch) | |
tree | 8e526c1403ba8d0689ab40a24165fc19d8a07e27 /src/mapblock_mesh.cpp | |
parent | 1992db1395d9c068327a7c08bac7a24ef7112274 (diff) | |
download | minetest-7528986e4449febead9b18b6118f0b096f7cf800.tar.gz minetest-7528986e4449febead9b18b6118f0b096f7cf800.tar.bz2 minetest-7528986e4449febead9b18b6118f0b096f7cf800.zip |
Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial)
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Spelling: vertice -> vertex
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r-- | src/mapblock_mesh.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index 2e408ba4b..f2f013cbc 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1507,8 +1507,8 @@ void MeshCollector::applyTileColors() video::SColor tc = pmb.layer.color; if (tc == video::SColor(0xFFFFFFFF)) continue; - for (auto &tangent_vertice : pmb.tangent_vertices) { - video::SColor *c = &tangent_vertice.Color; + for (video::S3DVertexTangents &tangent_vertex : pmb.tangent_vertices) { + video::SColor *c = &tangent_vertex.Color; c->set(c->getAlpha(), c->getRed() * tc.getRed() / 255, c->getGreen() * tc.getGreen() / 255, c->getBlue() * tc.getBlue() / 255); @@ -1521,8 +1521,8 @@ void MeshCollector::applyTileColors() video::SColor tc = pmb.layer.color; if (tc == video::SColor(0xFFFFFFFF)) continue; - for (auto &vertice : pmb.vertices) { - video::SColor *c = &vertice.Color; + for (video::S3DVertex &vertex : pmb.vertices) { + video::SColor *c = &vertex.Color; c->set(c->getAlpha(), c->getRed() * tc.getRed() / 255, c->getGreen() * tc.getGreen() / 255, c->getBlue() * tc.getBlue() / 255); |