aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-08-03 00:50:17 +0200
committer GitHub <noreply@github.com>2024-08-03 00:50:17 +0200
commitfde15e554dc9ed458a838683c69d10262764db12 (patch)
tree9e7af8634eafc8461bd02697dd48ae36ca924858 /extension/src/openvic-extension/classes/GFXPieChartTexture.cpp
parent8431914a6971cbacfb20bba13a4113d9ac4d5153 (diff)
parent06b76612b28183f0a047dac3a4127120d2af1b39 (diff)
Merge pull request #249 from OpenVicProject/utf8-fix
Use UTF8 encoding and simplify godot string conversion
Diffstat (limited to 'extension/src/openvic-extension/classes/GFXPieChartTexture.cpp')
-rw-r--r--extension/src/openvic-extension/classes/GFXPieChartTexture.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp
index 47e32a2..417566d 100644
--- a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp
+++ b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp
@@ -8,8 +8,6 @@
using namespace godot;
using namespace OpenVic;
-using OpenVic::Utilities::std_view_to_godot_string;
-
StringName const& GFXPieChartTexture::_slice_identifier_key() {
static const StringName slice_identifier_key = "identifier";
return slice_identifier_key;
@@ -109,7 +107,8 @@ Error GFXPieChartTexture::set_slices_array(godot_pie_chart_data_t const& new_sli
for (int32_t i = 0; i < new_slices.size(); ++i) {
Dictionary const& slice_dict = new_slices[i];
ERR_CONTINUE_MSG(
- !slice_dict.has(_slice_colour_key()) || !slice_dict.has(_slice_weight_key()), vformat("Invalid slice keys at index %d", i)
+ !slice_dict.has(_slice_colour_key()) || !slice_dict.has(_slice_weight_key()),
+ vformat("Invalid slice keys at index %d", i)
);
const slice_t slice = std::make_pair(slice_dict[_slice_colour_key()], slice_dict[_slice_weight_key()]);
if (slice.second > 0.0f) {
@@ -171,12 +170,13 @@ Error GFXPieChartTexture::set_gfx_pie_chart_name(String const& gfx_pie_chart_nam
ERR_FAIL_NULL_V_MSG(
new_pie_chart, FAILED, vformat(
"Invalid type for GFX sprite %s: %s (expected %s)", gfx_pie_chart_name,
- std_view_to_godot_string(sprite->get_type()), std_view_to_godot_string(GFX::PieChart::get_type_static())
+ Utilities::std_to_godot_string(sprite->get_type()),
+ Utilities::std_to_godot_string(GFX::PieChart::get_type_static())
)
);
return set_gfx_pie_chart(new_pie_chart);
}
String GFXPieChartTexture::get_gfx_pie_chart_name() const {
- return gfx_pie_chart != nullptr ? std_view_to_godot_string(gfx_pie_chart->get_name()) : String {};
+ return gfx_pie_chart != nullptr ? Utilities::std_to_godot_string(gfx_pie_chart->get_name()) : String {};
}