summaryrefslogtreecommitdiff
path: root/src/unittest/test_voxelalgorithms.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/unittest/test_voxelalgorithms.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/unittest/test_voxelalgorithms.cpp')
-rw-r--r--src/unittest/test_voxelalgorithms.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unittest/test_voxelalgorithms.cpp b/src/unittest/test_voxelalgorithms.cpp
index fd83844af..8c236b73e 100644
--- a/src/unittest/test_voxelalgorithms.cpp
+++ b/src/unittest/test_voxelalgorithms.cpp
@@ -215,11 +215,11 @@ void TestVoxelAlgorithms::testVoxelLineIterator(INodeDefManager *ndef)
for (f32 x = -9.1; x < 9; x += 3.124) {
for (f32 y = -9.2; y < 9; y += 3.123) {
for (f32 z = -9.3; z < 9; z += 3.122) {
- lines.push_back(core::line3d<f32>(-x, -y, -z, x, y, z));
+ lines.emplace_back(-x, -y, -z, x, y, z);
}
}
}
- lines.push_back(core::line3d<f32>(0, 0, 0, 0, 0, 0));
+ lines.emplace_back(0, 0, 0, 0, 0, 0);
// Test every line
std::vector<core::line3d<f32> >::iterator it = lines.begin();
for (; it < lines.end(); it++) {