godotengine / godotengine/godot-cpp
String::num_uint64() signature is incorrect
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
(From 19091138895d35e1ce69742889b8bfd82be57f17)
In the generated header file:
```cpp
static String num_scientific(double number);
static String num(double number, int64_t decimals = -1);
static String num_int64(int64_t number, int64_t base = 10, bool capitalize_hex = false);
static String num_uint64(int64_t number, int64_t base = 10, bool capitalize_hex = false);
```
**num_uint64** should be:
```cpp
static String num_uint64(uint64_t p_num, int base = 10, bool capitalize_hex = false);
```
as it is in Godot.
Also not sure why the `base` type is changed from int (in Godot) to int64_t in godot-cpp. It is changed for all these number to string functions and `num_real` is missing.
From Godot's _ustring.h_:
```cpp
static String num(double p_num, int p_decimals = -1);
static String num_scientific(double p_num);
static String num_real(double p_num, bool p_trailing = true);
static String num_int64(int64_t p_num, int base = 10, bool capitalize_hex = false);
static String num_uint64(uint64_t p_num, int base = 10, bool capitalize_hex = false);
```
(This was found by turning on warnings...)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.