From 6c2abde5c99a236453b795abaa6d7d70105e31f7 Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 14:50:33 +0500 Subject: Just a big Ctrl+H refactoring --- src/game/shared/world/voxel_registry.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/game/shared/world/voxel_registry.cc') diff --git a/src/game/shared/world/voxel_registry.cc b/src/game/shared/world/voxel_registry.cc index fae83fa..f950a4d 100644 --- a/src/game/shared/world/voxel_registry.cc +++ b/src/game/shared/world/voxel_registry.cc @@ -3,19 +3,19 @@ #include "shared/world/voxel_registry.hh" static std::uint64_t registry_checksum = 0U; -emhash8::HashMap world::voxel_registry::names; -std::vector> world::voxel_registry::voxels; +emhash8::HashMap voxel_registry::names; +std::vector> voxel_registry::voxels; static void recalculate_checksum(void) { registry_checksum = 0U; - for(const auto& voxel : world::voxel_registry::voxels) { + for(const auto& voxel : voxel_registry::voxels) { registry_checksum = voxel->get_checksum(registry_checksum); } } -world::Voxel* world::voxel_registry::register_voxel(const VoxelBuilder& builder) +Voxel* voxel_registry::register_voxel(const VoxelBuilder& builder) { assert(builder.get_name().size()); assert(nullptr == find(builder.get_name())); @@ -31,7 +31,7 @@ world::Voxel* world::voxel_registry::register_voxel(const VoxelBuilder& builder) return voxels.back().get(); } -world::Voxel* world::voxel_registry::find(std::string_view name) +Voxel* voxel_registry::find(std::string_view name) { const auto it = names.find(std::string(name)); @@ -42,7 +42,7 @@ world::Voxel* world::voxel_registry::find(std::string_view name) return voxels[it->second - 1].get(); } -world::Voxel* world::voxel_registry::find(voxel_id id) +Voxel* voxel_registry::find(voxel_id id) { if(id == NULL_VOXEL_ID || id > voxels.size()) { return nullptr; @@ -51,14 +51,14 @@ world::Voxel* world::voxel_registry::find(voxel_id id) return voxels[id - 1].get(); } -void world::voxel_registry::purge(void) +void voxel_registry::purge(void) { registry_checksum = 0U; voxels.clear(); names.clear(); } -std::uint64_t world::voxel_registry::get_checksum(void) +std::uint64_t voxel_registry::get_checksum(void) { return registry_checksum; } -- cgit