From 5ac196aca5d8a47388b5848b0c747c612b270f22 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 31 May 2023 01:38:42 +0200 Subject: [PATCH] Fix warning. --- gdnative/string.cpp | 5 ++--- include/gdn/string.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gdnative/string.cpp b/gdnative/string.cpp index c1a439c..c169926 100644 --- a/gdnative/string.cpp +++ b/gdnative/string.cpp @@ -59,10 +59,9 @@ char GDAPI pandemonium_char_16_string_get(const pandemonium_char_16_string *p_se *((char *)&dest) = self->get(p_index); return dest; } -void GDAPI pandemonium_char_16_string_set(pandemonium_char_16_string *p_self, pandemonium_int p_index, const char p_elem) { +void GDAPI pandemonium_char_16_string_set(pandemonium_char_16_string *p_self, pandemonium_int p_index, const char16_t p_elem) { Char16String *self = (Char16String *)p_self; - const char *elem = (const char *)p_elem; - self->set(p_index, *elem); + self->set(p_index, p_elem); } pandemonium_int GDAPI pandemonium_char_16_string_length(const pandemonium_char_16_string *p_cs) { diff --git a/include/gdn/string.h b/include/gdn/string.h index 2dec58e..c63dbb5 100644 --- a/include/gdn/string.h +++ b/include/gdn/string.h @@ -85,7 +85,7 @@ pandemonium_int GDAPI pandemonium_char_16_string_size(const pandemonium_char_16_ pandemonium_error GDAPI pandemonium_char_16_string_resize(pandemonium_char_16_string *p_self, pandemonium_int p_size); char GDAPI pandemonium_char_16_string_get(const pandemonium_char_16_string *p_self, pandemonium_int p_index); -void GDAPI pandemonium_char_16_string_set(pandemonium_char_16_string *p_self, pandemonium_int p_index, const char p_elem); +void GDAPI pandemonium_char_16_string_set(pandemonium_char_16_string *p_self, pandemonium_int p_index, const char16_t p_elem); //_FORCE_INLINE_ void operator=(const Char16String &p_str); //void operator=(const char *p_cstr);