diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/shared/world/item.cc | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/shared/world/item.cc')
| -rw-r--r-- | src/game/shared/world/item.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/shared/world/item.cc b/src/game/shared/world/item.cc index 5e60609..bc1546a 100644 --- a/src/game/shared/world/item.cc +++ b/src/game/shared/world/item.cc @@ -6,17 +6,17 @@ #include "shared/world/voxel.hh" -world::Item::Item(const Item& source, item_id id) noexcept : Item(source) +Item::Item(const Item& source, item_id id) noexcept : Item(source) { m_id = id; } -void world::Item::set_cached_texture(resource_ptr<TextureGUI> texture) const noexcept +void Item::set_cached_texture(resource_ptr<TextureGUI> texture) const noexcept { m_cached_texture = std::move(texture); } -std::uint64_t world::Item::get_checksum(std::uint64_t combine) const +std::uint64_t Item::get_checksum(std::uint64_t combine) const { combine = math::crc64(m_name.data(), m_name.size(), combine); combine = math::crc64(m_texture.data(), m_texture.size(), combine); @@ -27,29 +27,29 @@ std::uint64_t world::Item::get_checksum(std::uint64_t combine) const return combine; } -world::ItemBuilder::ItemBuilder(std::string_view name) +ItemBuilder::ItemBuilder(std::string_view name) { set_name(name); } -void world::ItemBuilder::set_name(std::string_view name) +void ItemBuilder::set_name(std::string_view name) { assert(name.size()); m_name = name; } -void world::ItemBuilder::set_texture(std::string_view texture) +void ItemBuilder::set_texture(std::string_view texture) { m_texture = texture; } -void world::ItemBuilder::set_place_voxel(const Voxel* place_voxel) +void ItemBuilder::set_place_voxel(const Voxel* place_voxel) { m_place_voxel = place_voxel; } -std::unique_ptr<world::Item> world::ItemBuilder::build(item_id id) const +std::unique_ptr<Item> ItemBuilder::build(item_id id) const { return std::make_unique<Item>(*this, id); } |
