mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 11:56:00 -04:00
Use SDL function for rwops size
This commit is contained in:
parent
aef47fbfeb
commit
5f6191dfc1
@ -191,12 +191,7 @@ Sint64 RWops::Tell() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Sint64 RWops::Size() {
|
Sint64 RWops::Size() {
|
||||||
Sint64 old_pos = Tell();
|
return SDL_RWsize(rwops_);
|
||||||
Sint64 size = Seek(0, RW_SEEK_END);
|
|
||||||
Sint64 back_pos = Seek(old_pos, RW_SEEK_SET);
|
|
||||||
(void)back_pos; // silence unused variable warning on release build
|
|
||||||
assert(back_pos == old_pos);
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint16 RWops::ReadBE16() {
|
Uint16 RWops::ReadBE16() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user