From 25e469466fbee51efa958d1ca9dd1f270a41c7af Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 19 Jul 2024 20:47:02 +0100 Subject: Update openvic-simulation to OpenVicProject/OpenVic-Simulation@d1f3a96 --- extension/deps/openvic-simulation | 2 +- extension/src/openvic-extension/classes/GFXPieChartTexture.cpp | 6 +++--- extension/src/openvic-extension/classes/MapMesh.cpp | 8 ++++---- extension/src/openvic-extension/classes/MapMesh.hpp | 8 ++++---- extension/src/openvic-extension/utility/StringLiteral.hpp | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/extension/deps/openvic-simulation b/extension/deps/openvic-simulation index 2d111ea..d1f3a96 160000 --- a/extension/deps/openvic-simulation +++ b/extension/deps/openvic-simulation @@ -1 +1 @@ -Subproject commit 2d111ea003e975ea1adbcd7e4d903f760f1daa07 +Subproject commit d1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 diff --git a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp index ead72cf..47e32a2 100644 --- a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp +++ b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp @@ -11,15 +11,15 @@ using namespace OpenVic; using OpenVic::Utilities::std_view_to_godot_string; StringName const& GFXPieChartTexture::_slice_identifier_key() { - static StringName const slice_identifier_key = "identifier"; + static const StringName slice_identifier_key = "identifier"; return slice_identifier_key; } StringName const& GFXPieChartTexture::_slice_colour_key() { - static StringName const slice_colour_key = "colour"; + static const StringName slice_colour_key = "colour"; return slice_colour_key; } StringName const& GFXPieChartTexture::_slice_weight_key() { - static StringName const slice_weight_key = "weight"; + static const StringName slice_weight_key = "weight"; return slice_weight_key; } diff --git a/extension/src/openvic-extension/classes/MapMesh.cpp b/extension/src/openvic-extension/classes/MapMesh.cpp index 8db3b84..ba1b19f 100644 --- a/extension/src/openvic-extension/classes/MapMesh.cpp +++ b/extension/src/openvic-extension/classes/MapMesh.cpp @@ -45,7 +45,7 @@ void MapMesh::_request_update() { set_add_uv2(get_add_uv2()); } -void MapMesh::set_aspect_ratio(const float ratio) { +void MapMesh::set_aspect_ratio(float ratio) { aspect_ratio = ratio; _request_update(); } @@ -54,7 +54,7 @@ float MapMesh::get_aspect_ratio() const { return aspect_ratio; } -void MapMesh::set_repeat_proportion(const float proportion) { +void MapMesh::set_repeat_proportion(float proportion) { repeat_proportion = proportion; _request_update(); } @@ -63,7 +63,7 @@ float MapMesh::get_repeat_proportion() const { return repeat_proportion; } -void MapMesh::set_subdivide_width(const int32_t divisions) { +void MapMesh::set_subdivide_width(int32_t divisions) { subdivide_w = divisions > 0 ? divisions : 0; _request_update(); } @@ -72,7 +72,7 @@ int32_t MapMesh::get_subdivide_width() const { return subdivide_w; } -void MapMesh::set_subdivide_depth(const int32_t divisions) { +void MapMesh::set_subdivide_depth(int32_t divisions) { subdivide_d = divisions > 0 ? divisions : 0; _request_update(); } diff --git a/extension/src/openvic-extension/classes/MapMesh.hpp b/extension/src/openvic-extension/classes/MapMesh.hpp index 38b208c..20383ca 100644 --- a/extension/src/openvic-extension/classes/MapMesh.hpp +++ b/extension/src/openvic-extension/classes/MapMesh.hpp @@ -14,16 +14,16 @@ namespace OpenVic { void _request_update(); public: - void set_aspect_ratio(const float ratio); + void set_aspect_ratio(float ratio); float get_aspect_ratio() const; - void set_repeat_proportion(const float proportion); + void set_repeat_proportion(float proportion); float get_repeat_proportion() const; - void set_subdivide_width(const int32_t divisions); + void set_subdivide_width(int32_t divisions); int32_t get_subdivide_width() const; - void set_subdivide_depth(const int32_t divisions); + void set_subdivide_depth(int32_t divisions); int32_t get_subdivide_depth() const; godot::AABB get_core_aabb() const; diff --git a/extension/src/openvic-extension/utility/StringLiteral.hpp b/extension/src/openvic-extension/utility/StringLiteral.hpp index 90b18cd..1298254 100644 --- a/extension/src/openvic-extension/utility/StringLiteral.hpp +++ b/extension/src/openvic-extension/utility/StringLiteral.hpp @@ -53,7 +53,7 @@ namespace OpenVic { constexpr iterator operator+(const difference_type other) const { return _ptr + other; } - constexpr friend iterator operator+(const difference_type value, const iterator& other) { + constexpr friend iterator operator+(const difference_type value, iterator const& other) { return other + value; } constexpr iterator& operator--() { @@ -69,19 +69,19 @@ namespace OpenVic { _ptr -= i; return *this; } - constexpr difference_type operator-(const iterator& other) const { + constexpr difference_type operator-(iterator const& other) const { return _ptr - other._ptr; } constexpr iterator operator-(const difference_type other) const { return _ptr - other; } - friend iterator operator-(const difference_type value, const iterator& other) { + friend iterator operator-(const difference_type value, iterator const& other) { return other - value; } constexpr reference operator[](difference_type idx) const { return _ptr[idx]; } - constexpr auto operator<=>(const iterator&) const = default; // three-way comparison C++20 + constexpr auto operator<=>(iterator const&) const = default; // three-way comparison C++20 private: pointer _ptr; -- cgit v1.2.3-56-ga3b1