From 4aec51ee6976f1ca7596d3870689bb761fffd56d Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Tue, 6 Mar 2018 20:04:56 +0500 Subject: Simplified Section class --- src/Section.hpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/Section.hpp') diff --git a/src/Section.hpp b/src/Section.hpp index e647600..7617c24 100644 --- a/src/Section.hpp +++ b/src/Section.hpp @@ -10,11 +10,11 @@ class Section { std::vector block; std::vector light; std::vector sky; - unsigned char bitsPerBlock; + unsigned char bitsPerBlock = 0; std::vector palette; Vector worldPosition; - mutable size_t hash; + mutable size_t hash = 0; void CalculateHash() const; @@ -22,16 +22,8 @@ class Section { public: Section(Vector pos, unsigned char bitsPerBlock, std::vector palette, std::vector blockData, std::vector lightData, std::vector skyData); - Section(); - - ~Section(); - - Section(const Section &other); - - Section(Section &&other) noexcept; - - Section &operator=(Section other) noexcept; - + Section() = default; + BlockId GetBlockId(Vector pos) const; unsigned char GetBlockLight(Vector pos) const; @@ -47,6 +39,4 @@ public: Vector GetPosition() const; size_t GetHash() const; - - friend void swap(Section& lhs, Section& rhs) noexcept; }; \ No newline at end of file -- cgit v1.2.3