You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-30 16:26:50 +00:00
Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
This commit is contained in:
@@ -1233,13 +1233,13 @@ void godotsharp_pushwarning(const godot_string *p_str) {
|
||||
WARN_PRINT(*reinterpret_cast<const String *>(p_str));
|
||||
}
|
||||
|
||||
void godotsharp_var2str(const godot_variant *p_var, godot_string *r_ret) {
|
||||
void godotsharp_var_to_str(const godot_variant *p_var, godot_string *r_ret) {
|
||||
const Variant &var = *reinterpret_cast<const Variant *>(p_var);
|
||||
String &vars = *memnew_placement(r_ret, String);
|
||||
VariantWriter::write_to_string(var, vars);
|
||||
}
|
||||
|
||||
void godotsharp_str2var(const godot_string *p_str, godot_variant *r_ret) {
|
||||
void godotsharp_str_to_var(const godot_string *p_str, godot_variant *r_ret) {
|
||||
Variant ret;
|
||||
|
||||
VariantParser::StreamString ss;
|
||||
@@ -1256,7 +1256,7 @@ void godotsharp_str2var(const godot_string *p_str, godot_variant *r_ret) {
|
||||
memnew_placement(r_ret, Variant(ret));
|
||||
}
|
||||
|
||||
void godotsharp_var2bytes(const godot_variant *p_var, bool p_full_objects, godot_packed_array *r_bytes) {
|
||||
void godotsharp_var_to_bytes(const godot_variant *p_var, bool p_full_objects, godot_packed_array *r_bytes) {
|
||||
const Variant &var = *reinterpret_cast<const Variant *>(p_var);
|
||||
PackedByteArray &bytes = *memnew_placement(r_bytes, PackedByteArray);
|
||||
|
||||
@@ -1268,7 +1268,7 @@ void godotsharp_var2bytes(const godot_variant *p_var, bool p_full_objects, godot
|
||||
encode_variant(var, bytes.ptrw(), len, p_full_objects);
|
||||
}
|
||||
|
||||
void godotsharp_bytes2var(const godot_packed_array *p_bytes, bool p_allow_objects, godot_variant *r_ret) {
|
||||
void godotsharp_bytes_to_var(const godot_packed_array *p_bytes, bool p_allow_objects, godot_variant *r_ret) {
|
||||
const PackedByteArray *bytes = reinterpret_cast<const PackedByteArray *>(p_bytes);
|
||||
Variant ret;
|
||||
Error err = decode_variant(ret, bytes->ptr(), bytes->size(), nullptr, p_allow_objects);
|
||||
@@ -1479,7 +1479,7 @@ static const void *unmanaged_callbacks[]{
|
||||
(void *)godotsharp_node_path_get_subname,
|
||||
(void *)godotsharp_node_path_get_subname_count,
|
||||
(void *)godotsharp_node_path_is_absolute,
|
||||
(void *)godotsharp_bytes2var,
|
||||
(void *)godotsharp_bytes_to_var,
|
||||
(void *)godotsharp_convert,
|
||||
(void *)godotsharp_hash,
|
||||
(void *)godotsharp_instance_from_id,
|
||||
@@ -1499,9 +1499,9 @@ static const void *unmanaged_callbacks[]{
|
||||
(void *)godotsharp_seed,
|
||||
(void *)godotsharp_weakref,
|
||||
(void *)godotsharp_str,
|
||||
(void *)godotsharp_str2var,
|
||||
(void *)godotsharp_var2bytes,
|
||||
(void *)godotsharp_var2str,
|
||||
(void *)godotsharp_str_to_var,
|
||||
(void *)godotsharp_var_to_bytes,
|
||||
(void *)godotsharp_var_to_str,
|
||||
(void *)godotsharp_pusherror,
|
||||
(void *)godotsharp_pushwarning,
|
||||
(void *)godotsharp_object_to_string,
|
||||
|
||||
Reference in New Issue
Block a user