summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-20 13:30:50 +0200
committerGitHub <noreply@github.com>2017-08-20 13:30:50 +0200
commit1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3 (patch)
tree03dd0c39e323c7f0b1f06014ff30e74f429bfa01 /src/mapnode.cpp
parent50669cd2822a11570ae462972194eeb2d585a8c1 (diff)
downloadminetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.tar.gz
minetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.tar.bz2
minetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.zip
Modernize source code: last part (#6285)
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r--src/mapnode.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 8799eb380..9b6a39e1b 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -431,12 +431,11 @@ void transformNodeBox(const MapNode &n, const NodeBox &nodebox,
boxes_size += nodebox.connect_right.size();
boxes.reserve(boxes_size);
-#define BOXESPUSHBACK(c) do { \
+#define BOXESPUSHBACK(c) \
for (std::vector<aabb3f>::const_iterator \
it = (c).begin(); \
it != (c).end(); ++it) \
- (boxes).push_back(*it); \
- } while (0)
+ (boxes).push_back(*it);
BOXESPUSHBACK(nodebox.fixed);