diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-03 15:19:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 15:19:07 +0200 |
commit | 7ab34e1a96ad6210bd583a00df379637b31169d6 (patch) | |
tree | cb7e2f031dd739a9c5aa05ffd4c0d0f6c29f915a /core/core_bind.cpp | |
parent | df5a20a310451fb2debb732c690a0cc18c714c2f (diff) | |
parent | 12462d9055bded888ae5ced2e121e667b3e0e0e3 (diff) |
Merge pull request #48889 from Calinou/file-rename-endian-swap
Rename File's `endian_swap` to `big_endian`
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r-- | core/core_bind.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 05265c41ad..ed4387a1b9 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -1225,7 +1225,7 @@ Error _File::open(const String &p_path, ModeFlags p_mode_flags) { Error err; f = FileAccess::open(p_path, p_mode_flags, &err); if (f) { - f->set_endian_swap(eswap); + f->set_big_endian(big_endian); } return err; } @@ -1381,15 +1381,15 @@ Vector<String> _File::get_csv_line(const String &p_delim) const { * These flags get reset to false (little endian) on each open */ -void _File::set_endian_swap(bool p_swap) { - eswap = p_swap; +void _File::set_big_endian(bool p_big_endian) { + big_endian = p_big_endian; if (f) { - f->set_endian_swap(p_swap); + f->set_big_endian(p_big_endian); } } -bool _File::get_endian_swap() { - return eswap; +bool _File::is_big_endian() { + return big_endian; } Error _File::get_error() const { @@ -1551,8 +1551,8 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("get_as_text"), &_File::get_as_text); ClassDB::bind_method(D_METHOD("get_md5", "path"), &_File::get_md5); ClassDB::bind_method(D_METHOD("get_sha256", "path"), &_File::get_sha256); - ClassDB::bind_method(D_METHOD("get_endian_swap"), &_File::get_endian_swap); - ClassDB::bind_method(D_METHOD("set_endian_swap", "enable"), &_File::set_endian_swap); + ClassDB::bind_method(D_METHOD("is_big_endian"), &_File::is_big_endian); + ClassDB::bind_method(D_METHOD("set_big_endian", "big_endian"), &_File::set_big_endian); ClassDB::bind_method(D_METHOD("get_error"), &_File::get_error); ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &_File::get_var, DEFVAL(false)); @@ -1575,7 +1575,7 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("file_exists", "path"), &_File::file_exists); ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &_File::get_modified_time); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "endian_swap"), "set_endian_swap", "get_endian_swap"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian"); BIND_ENUM_CONSTANT(READ); BIND_ENUM_CONSTANT(WRITE); |