mirror of https://github.com/libsdl-org/SDL
SDL_migration.cocci: simplify multiplicaction / division by 1
This commit is contained in:
parent
57e78f4cf5
commit
9eaea7d661
|
@ -215,7 +215,7 @@ expression e;
|
|||
- SDL_GetRevisionNumber()
|
||||
|
||||
// SDL_RWread
|
||||
@@
|
||||
@ rule_rwread @
|
||||
expression e1, e2, e3, e4;
|
||||
identifier i;
|
||||
@@
|
||||
|
@ -237,7 +237,7 @@ identifier i;
|
|||
)
|
||||
|
||||
// SDL_RWwrite
|
||||
@@
|
||||
@ rule_rwwrite @
|
||||
expression e1, e2, e3, e4;
|
||||
identifier i;
|
||||
@@
|
||||
|
@ -257,6 +257,17 @@ identifier i;
|
|||
+ e3 * e4)
|
||||
)
|
||||
|
||||
@ depends on rule_rwread || rule_rwwrite @
|
||||
expression e;
|
||||
@@
|
||||
(
|
||||
- e * 1
|
||||
+ e
|
||||
|
|
||||
- e / 1
|
||||
+ e
|
||||
)
|
||||
|
||||
// SDL_SIMDAlloc(), SDL_SIMDFree() have been removed.
|
||||
@@
|
||||
expression e1;
|
||||
|
|
Loading…
Reference in New Issue