Merge pull request #48889 from Calinou/file-rename-endian-swap
Rename File's `endian_swap` to `big_endian`
This commit is contained in:
commit
7ab34e1a96
11 changed files with 43 additions and 43 deletions
|
|
@ -320,9 +320,9 @@ uint64_t FileAccessPack::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
|
|||
return to_read;
|
||||
}
|
||||
|
||||
void FileAccessPack::set_endian_swap(bool p_swap) {
|
||||
FileAccess::set_endian_swap(p_swap);
|
||||
f->set_endian_swap(p_swap);
|
||||
void FileAccessPack::set_big_endian(bool p_big_endian) {
|
||||
FileAccess::set_big_endian(p_big_endian);
|
||||
f->set_big_endian(p_big_endian);
|
||||
}
|
||||
|
||||
Error FileAccessPack::get_error() const {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ public:
|
|||
|
||||
virtual uint64_t get_buffer(uint8_t *p_dst, uint64_t p_length) const;
|
||||
|
||||
virtual void set_endian_swap(bool p_swap);
|
||||
virtual void set_big_endian(bool p_big_endian);
|
||||
|
||||
virtual Error get_error() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -851,7 +851,7 @@ void ResourceLoaderBinary::open(FileAccess *p_f) {
|
|||
bool big_endian = f->get_32();
|
||||
bool use_real64 = f->get_32();
|
||||
|
||||
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
|
||||
f->set_big_endian(big_endian != 0); //read big endian if saved as big endian
|
||||
|
||||
uint32_t ver_major = f->get_32();
|
||||
uint32_t ver_minor = f->get_32();
|
||||
|
|
@ -948,7 +948,7 @@ String ResourceLoaderBinary::recognize(FileAccess *p_f) {
|
|||
bool big_endian = f->get_32();
|
||||
f->get_32(); // use_real64
|
||||
|
||||
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
|
||||
f->set_big_endian(big_endian != 0); //read big endian if saved as big endian
|
||||
|
||||
uint32_t ver_major = f->get_32();
|
||||
f->get_32(); // ver_minor
|
||||
|
|
@ -1097,13 +1097,13 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
|
|||
bool big_endian = f->get_32();
|
||||
bool use_real64 = f->get_32();
|
||||
|
||||
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
|
||||
f->set_big_endian(big_endian != 0); //read big endian if saved as big endian
|
||||
#ifdef BIG_ENDIAN_ENABLED
|
||||
fw->store_32(!big_endian);
|
||||
#else
|
||||
fw->store_32(big_endian);
|
||||
#endif
|
||||
fw->set_endian_swap(big_endian != 0);
|
||||
fw->set_big_endian(big_endian != 0);
|
||||
fw->store_32(use_real64); //use real64
|
||||
|
||||
uint32_t ver_major = f->get_32();
|
||||
|
|
@ -1798,7 +1798,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
|
|||
|
||||
if (big_endian) {
|
||||
f->store_32(1);
|
||||
f->set_endian_swap(true);
|
||||
f->set_big_endian(true);
|
||||
} else {
|
||||
f->store_32(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ Array StreamPeer::_get_partial_data(int p_bytes) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
void StreamPeer::set_big_endian(bool p_enable) {
|
||||
big_endian = p_enable;
|
||||
void StreamPeer::set_big_endian(bool p_big_endian) {
|
||||
big_endian = p_big_endian;
|
||||
}
|
||||
|
||||
bool StreamPeer::is_big_endian_enabled() const {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public:
|
|||
|
||||
virtual int get_available_bytes() const = 0;
|
||||
|
||||
void set_big_endian(bool p_enable);
|
||||
void set_big_endian(bool p_big_endian);
|
||||
bool is_big_endian_enabled() const;
|
||||
|
||||
void put_8(int8_t p_val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue