Merge pull request #38713 from aaronfranke/string-64bit

Make all String integer conversion methods be 64-bit
This commit is contained in:
Rémi Verschelde 2020-07-01 16:01:05 +02:00 committed by GitHub
commit a8a2769bb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 40 additions and 109 deletions

View file

@ -613,19 +613,19 @@ int64_t GDAPI godot_string_char_to_int64_with_len(const wchar_t *p_str, int p_le
int64_t GDAPI godot_string_hex_to_int64(const godot_string *p_self) {
const String *self = (const String *)p_self;
return self->hex_to_int64(false);
return self->hex_to_int(false);
}
int64_t GDAPI godot_string_hex_to_int64_with_prefix(const godot_string *p_self) {
const String *self = (const String *)p_self;
return self->hex_to_int64();
return self->hex_to_int();
}
int64_t GDAPI godot_string_to_int64(const godot_string *p_self) {
const String *self = (const String *)p_self;
return self->to_int64();
return self->to_int();
}
double GDAPI godot_string_unicode_char_to_double(const wchar_t *p_str, const wchar_t **r_end) {

View file

@ -952,16 +952,16 @@ void GDScriptTokenizerText::_advance() {
INCPOS(i);
if (hexa_found) {
int64_t val = str.hex_to_int64();
int64_t val = str.hex_to_int();
_make_constant(val);
} else if (bin_found) {
int64_t val = str.bin_to_int64();
int64_t val = str.bin_to_int();
_make_constant(val);
} else if (period_found || exponent_found) {
double val = str.to_double();
_make_constant(val);
} else {
int64_t val = str.to_int64();
int64_t val = str.to_int();
_make_constant(val);
}