From 951e01a66e171aafe65bc2d86291b2d0d08ca365 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 1 Aug 2021 18:49:13 +0200 Subject: [PATCH] Fix a few return values. --- library/terraman_library.cpp | 12 ++++++------ library/terraman_library.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/library/terraman_library.cpp b/library/terraman_library.cpp index ef1dd00..4282af9 100644 --- a/library/terraman_library.cpp +++ b/library/terraman_library.cpp @@ -67,11 +67,11 @@ Ref TerramanLibrary::material_lod_get(const int index) { return _materials[index]; } -Variant TerramanLibrary::material_cached_get_key(const Ref &chunk) { +int TerramanLibrary::material_cached_get_key(const Ref &chunk) { return call("_material_cached_get_key", chunk); } -Variant TerramanLibrary::_material_cached_get_key(Ref chunk) { +int TerramanLibrary::_material_cached_get_key(Ref chunk) { return 0; } @@ -142,11 +142,11 @@ Ref TerramanLibrary::liquid_material_lod_get(const int index) { return _liquid_materials[index]; } -Variant TerramanLibrary::liquid_material_cached_get_key(const Ref &chunk) { +int TerramanLibrary::liquid_material_cached_get_key(const Ref &chunk) { return call("_liquid_material_cached_get_key", chunk); } -Variant TerramanLibrary::_liquid_material_cached_get_key(Ref chunk) { +int TerramanLibrary::_liquid_material_cached_get_key(Ref chunk) { return 0; } @@ -217,11 +217,11 @@ Ref TerramanLibrary::prop_material_lod_get(const int index) { return _prop_materials[index]; } -Variant TerramanLibrary::prop_material_cached_get_key(const Ref &chunk) { +int TerramanLibrary::prop_material_cached_get_key(const Ref &chunk) { return call("_prop_material_cached_get_key", chunk); } -Variant TerramanLibrary::_prop_material_cached_get_key(Ref chunk) { +int TerramanLibrary::_prop_material_cached_get_key(Ref chunk) { return 0; } diff --git a/library/terraman_library.h b/library/terraman_library.h index df9d9cc..fc6b0be 100644 --- a/library/terraman_library.h +++ b/library/terraman_library.h @@ -71,8 +71,8 @@ public: Ref material_get(const int index); Ref material_lod_get(const int index); - Variant material_cached_get_key(const Ref &chunk); - virtual Variant _material_cached_get_key(Ref chunk); + int material_cached_get_key(const Ref &chunk); + virtual int _material_cached_get_key(Ref chunk); Ref material_lod_cached_get(const int index, const int key); virtual Ref _material_lod_cached_get(const int index, const int key); @@ -88,8 +88,8 @@ public: Ref liquid_material_get(const int index); Ref liquid_material_lod_get(const int index); - Variant liquid_material_cached_get_key(const Ref &chunk); - virtual Variant _liquid_material_cached_get_key(Ref chunk); + int liquid_material_cached_get_key(const Ref &chunk); + virtual int _liquid_material_cached_get_key(Ref chunk); Ref liquid_material_lod_cached_get(const int index, const int key); virtual Ref _liquid_material_lod_cached_get(const int index, const int key); @@ -105,8 +105,8 @@ public: Ref prop_material_get(const int index); Ref prop_material_lod_get(const int index); - Variant prop_material_cached_get_key(const Ref &chunk); - virtual Variant _prop_material_cached_get_key(Ref chunk); + int prop_material_cached_get_key(const Ref &chunk); + virtual int _prop_material_cached_get_key(Ref chunk); Ref prop_material_lod_cached_get(const int index, const int key); virtual Ref _prop_material_lod_cached_get(const int index, const int key);