From 1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sun, 20 Aug 2017 13:30:50 +0200 Subject: 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 --- src/unittest/test_nodedef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/unittest/test_nodedef.cpp') diff --git a/src/unittest/test_nodedef.cpp b/src/unittest/test_nodedef.cpp index cb99ae854..66ca0ccbc 100644 --- a/src/unittest/test_nodedef.cpp +++ b/src/unittest/test_nodedef.cpp @@ -50,8 +50,8 @@ void TestNodeDef::testContentFeaturesSerialization() ContentFeatures f; f.name = "default:stone"; - for (int i = 0; i < 6; i++) - f.tiledef[i].name = "default_stone.png"; + for (TileDef &tiledef : f.tiledef) + tiledef.name = "default_stone.png"; f.is_ground_content = true; std::ostringstream os(std::ios::binary); -- cgit v1.2.3