mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 19:07:40 +00:00
SDL_migration: add RW read/write
This commit is contained in:
parent
efa2945502
commit
21e4be5a27
1 changed files with 45 additions and 3 deletions
|
@ -31,6 +31,48 @@
|
||||||
// So this file is a set of many semantic patches, mostly independant.
|
// So this file is a set of many semantic patches, mostly independant.
|
||||||
|
|
||||||
|
|
||||||
|
// SDL_RWread
|
||||||
|
@@
|
||||||
|
expression e1, e2, e3, e4;
|
||||||
|
identifier i;
|
||||||
|
@@
|
||||||
|
(
|
||||||
|
i = SDL_RWread(e1, e2,
|
||||||
|
- e3, e4);
|
||||||
|
+ e3 * e4);
|
||||||
|
+ i = (i <= 0) ? 0 : i / e3;
|
||||||
|
|
|
||||||
|
SDL_RWread(e1, e2,
|
||||||
|
- e3, e4);
|
||||||
|
+ e3 * e4);
|
||||||
|
|
|
||||||
|
+ /* FIXME MIGRATION: double-check if you use the returned value of SDL_RWread() */
|
||||||
|
SDL_RWread(e1, e2,
|
||||||
|
- e3, e4)
|
||||||
|
+ e3 * e4)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
// SDL_RWwrite
|
||||||
|
@@
|
||||||
|
expression e1, e2, e3, e4;
|
||||||
|
identifier i;
|
||||||
|
@@
|
||||||
|
(
|
||||||
|
i = SDL_RWwrite(e1, e2,
|
||||||
|
- e3, e4);
|
||||||
|
+ e3 * e4);
|
||||||
|
+ i = (i <= 0) ? 0 : i / e3;
|
||||||
|
|
|
||||||
|
SDL_RWwrite(e1, e2,
|
||||||
|
- e3, e4);
|
||||||
|
+ e3 * e4);
|
||||||
|
|
|
||||||
|
+ /* FIXME MIGRATION: double-check if you use the returned value of SDL_RWwrite() */
|
||||||
|
SDL_RWwrite(e1, e2,
|
||||||
|
- e3, e4)
|
||||||
|
+ e3 * e4)
|
||||||
|
)
|
||||||
|
|
||||||
// SDL_SIMDAlloc(), SDL_SIMDFree() have been removed.
|
// SDL_SIMDAlloc(), SDL_SIMDFree() have been removed.
|
||||||
@@
|
@@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue