summaryrefslogtreecommitdiffstats
path: root/game/shared/world/voxel_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/voxel_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/voxel_registry.hh')
-rw-r--r--game/shared/world/voxel_registry.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/game/shared/world/voxel_registry.hh b/game/shared/world/voxel_registry.hh
index 653c56e..9a7e206 100644
--- a/game/shared/world/voxel_registry.hh
+++ b/game/shared/world/voxel_registry.hh
@@ -108,12 +108,12 @@ namespace world
{
class VoxelInfoBuilder final {
public:
- explicit VoxelInfoBuilder(const char* name, voxel_type type, bool animated, bool blending);
+ explicit VoxelInfoBuilder(std::string_view name, voxel_type type, bool animated, bool blending);
virtual ~VoxelInfoBuilder(void) = default;
public:
- VoxelInfoBuilder& add_texture_default(const char* texture);
- VoxelInfoBuilder& add_texture(voxel_face face, const char* texture);
+ VoxelInfoBuilder& add_texture_default(std::string_view texture);
+ VoxelInfoBuilder& add_texture(voxel_face face, std::string_view texture);
VoxelInfoBuilder& set_touch(voxel_touch type, const glm::fvec3& values);
VoxelInfoBuilder& set_surface(voxel_surface surface);
@@ -135,8 +135,8 @@ extern std::vector<std::shared_ptr<VoxelInfo>> voxels;
namespace world::voxel_registry
{
-VoxelInfoBuilder& construct(const char* name, voxel_type type, bool animated, bool blending);
-VoxelInfo* find(const char* name);
+VoxelInfoBuilder& construct(std::string_view name, voxel_type type, bool animated, bool blending);
+VoxelInfo* find(std::string_view name);
VoxelInfo* find(const voxel_id voxel);
} // namespace world::voxel_registry
@@ -147,7 +147,7 @@ void purge(void);
namespace world::voxel_registry
{
-std::uint64_t calcualte_checksum(void);
+std::uint64_t calculate_checksum(void);
} // namespace world::voxel_registry
#endif // SHARED_VOXEL_REGISTRY_HH