diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-19 09:29:55 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-19 09:29:55 +0200 |
commit | d382483fa76028c2d34f75067bff45306c6da34e (patch) | |
tree | 1a8928995f3e7e15a5fc8834ee2127735b0e0ec6 /src/mapnode.cpp | |
parent | b5f7249a7edc25077d84b27b38552228b92ff763 (diff) | |
download | minetest-d382483fa76028c2d34f75067bff45306c6da34e.tar.gz minetest-d382483fa76028c2d34f75067bff45306c6da34e.tar.bz2 minetest-d382483fa76028c2d34f75067bff45306c6da34e.zip |
Code modernization: src/m* (part 3)
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* remove some unused headers in some cpp variable
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r-- | src/mapnode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp index b06b42ba8..2f92f0a21 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -455,7 +455,7 @@ void transformNodeBox(const MapNode &n, const NodeBox &nodebox, } else // NODEBOX_REGULAR { - boxes.push_back(aabb3f(-BS/2,-BS/2,-BS/2,BS/2,BS/2,BS/2)); + boxes.emplace_back(-BS/2,-BS/2,-BS/2,BS/2,BS/2,BS/2); } } @@ -764,7 +764,7 @@ void MapNode::deSerializeBulk(std::istream &is, int version, /* Legacy serialization */ -void MapNode::deSerialize_pre22(u8 *source, u8 version) +void MapNode::deSerialize_pre22(const u8 *source, u8 version) { if(version <= 1) { |