aboutsummaryrefslogtreecommitdiff
path: root/src/mesh_generator_thread.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-18 19:55:15 +0200
committerGitHub <noreply@github.com>2017-06-18 19:55:15 +0200
commit4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f (patch)
tree57ce8401a5f6538024c1f19d37d576fba21e147b /src/mesh_generator_thread.h
parent8f7785771b9e02b1a1daf7a252550d78ea93053d (diff)
downloadminetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.gz
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.bz2
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.zip
Cpp11 patchset 11: continue working on constructor style migration (#6004)
Diffstat (limited to 'src/mesh_generator_thread.h')
-rw-r--r--src/mesh_generator_thread.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/mesh_generator_thread.h b/src/mesh_generator_thread.h
index 3ac086e30..77b34a3ce 100644
--- a/src/mesh_generator_thread.h
+++ b/src/mesh_generator_thread.h
@@ -27,25 +27,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct CachedMapBlockData
{
- v3s16 p;
- MapNode *data; // A copy of the MapBlock's data member
- int refcount_from_queue;
- int last_used_timestamp;
+ v3s16 p = v3s16(-1337, -1337, -1337);
+ MapNode *data = nullptr; // A copy of the MapBlock's data member
+ int refcount_from_queue = 0;
+ int last_used_timestamp = std::time(0);
- CachedMapBlockData();
+ CachedMapBlockData() {}
~CachedMapBlockData();
};
struct QueuedMeshUpdate
{
- v3s16 p;
- bool ack_block_to_server;
- bool urgent;
- int crack_level;
+ v3s16 p = v3s16(-1337, -1337, -1337);
+ bool ack_block_to_server = false;
+ bool urgent = false;
+ int crack_level = -1;
v3s16 crack_pos;
- MeshMakeData *data; // This is generated in MeshUpdateQueue::pop()
+ MeshMakeData *data = nullptr; // This is generated in MeshUpdateQueue::pop()
- QueuedMeshUpdate();
+ QueuedMeshUpdate(){};
~QueuedMeshUpdate();
};
@@ -101,14 +101,11 @@ private:
struct MeshUpdateResult
{
- v3s16 p;
- MapBlockMesh *mesh;
- bool ack_block_to_server;
+ v3s16 p = v3s16(-1338, -1338, -1338);
+ MapBlockMesh *mesh = nullptr;
+ bool ack_block_to_server = false;
- MeshUpdateResult()
- : p(-1338, -1338, -1338), mesh(NULL), ack_block_to_server(false)
- {
- }
+ MeshUpdateResult() {}
};
class MeshUpdateThread : public UpdateThread