summaryrefslogtreecommitdiffstats
path: root/src/game/shared/world/voxel_registry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/shared/world/voxel_registry.cc')
-rw-r--r--src/game/shared/world/voxel_registry.cc16
1 files changed, 8 insertions, 8 deletions
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<std::string, voxel_id> world::voxel_registry::names;
-std::vector<std::unique_ptr<world::Voxel>> world::voxel_registry::voxels;
+emhash8::HashMap<std::string, voxel_id> voxel_registry::names;
+std::vector<std::unique_ptr<Voxel>> 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;
}