summaryrefslogtreecommitdiffstats
path: root/game/shared/world/item_registry.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 13:48:31 +0500
committeruntodesu <kirill@untode.su>2025-09-11 13:48:31 +0500
commitaaed751bf4430bf4b9b30cef532b8753b9f639ce (patch)
tree16bc751c272ba27ad53ec48dbdd3a6d9e6a8d4c2 /game/shared/world/item_registry.hh
parent96bd73ae020ecca1f94698744c77498a89ad19f7 (diff)
downloadvoxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.tar.bz2
voxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.zip
Replace most of C strings with string_view
Diffstat (limited to 'game/shared/world/item_registry.hh')
-rw-r--r--game/shared/world/item_registry.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/game/shared/world/item_registry.hh b/game/shared/world/item_registry.hh
index 7cf3bd8..7508f2a 100644
--- a/game/shared/world/item_registry.hh
+++ b/game/shared/world/item_registry.hh
@@ -26,11 +26,11 @@ namespace world
{
class ItemInfoBuilder final {
public:
- explicit ItemInfoBuilder(const char* name);
+ explicit ItemInfoBuilder(std::string_view name);
virtual ~ItemInfoBuilder(void) = default;
public:
- ItemInfoBuilder& set_texture(const char* texture);
+ ItemInfoBuilder& set_texture(std::string_view texture);
ItemInfoBuilder& set_place_voxel(voxel_id place_voxel);
public:
@@ -50,8 +50,8 @@ extern std::vector<std::shared_ptr<ItemInfo>> items;
namespace world::item_registry
{
-ItemInfoBuilder& construct(const char* name);
-ItemInfo* find(const char* name);
+ItemInfoBuilder& construct(std::string_view name);
+ItemInfo* find(std::string_view name);
ItemInfo* find(const item_id item);
} // namespace world::item_registry
@@ -62,7 +62,7 @@ void purge(void);
namespace world::item_registry
{
-std::uint64_t calcualte_checksum(void);
+std::uint64_t calculate_checksum(void);
} // namespace world::item_registry
#endif // SHARED_ITEM_REGISTRY_HH