]> git.localhorst.tv Git - blank.git/blobdiff - src/world/ChunkStore.hpp
some linting
[blank.git] / src / world / ChunkStore.hpp
index 3bbe96d8ee0068194a2a3f12303f81dc4543bf80..a0fd0f93686b07b68a934160c658cc4390828e76 100644 (file)
@@ -13,22 +13,23 @@ class ChunkIndex;
 class ChunkStore {
 
 public:
-       ChunkStore(const BlockTypeRegistry &);
+       explicit ChunkStore(const BlockTypeRegistry &);
        ~ChunkStore();
 
        ChunkStore(const ChunkStore &) = delete;
        ChunkStore &operator =(const ChunkStore &) = delete;
 
 public:
-       ChunkIndex &MakeIndex(const Chunk::Pos &base, int extent);
+       ChunkIndex &MakeIndex(const ExactLocation::Coarse &base, int extent);
        void UnregisterIndex(ChunkIndex &);
 
-       ChunkIndex *ClosestIndex(const Chunk::Pos &pos);
+       ChunkIndex *ClosestIndex(const ExactLocation::Coarse &pos);
 
        /// returns nullptr if given position is not loaded
-       Chunk *Get(const Chunk::Pos &);
+       Chunk *Get(const ExactLocation::Coarse &) noexcept;
+       const Chunk *Get(const ExactLocation::Coarse &) const noexcept;
        /// returns nullptr if given position is not indexed
-       Chunk *Allocate(const Chunk::Pos &);
+       Chunk *Allocate(const ExactLocation::Coarse &);
 
        std::list<Chunk>::iterator begin() noexcept { return loaded.begin(); }
        std::list<Chunk>::iterator end() noexcept { return loaded.end(); }
@@ -44,7 +45,7 @@ public:
 
        /// get coordinates of a missing chunk
        /// this will return garbage if none are actually missing
-       Chunk::Pos NextMissing() noexcept;
+       ExactLocation::Coarse NextMissing() noexcept;
 
        void Clean();