SDL_migration.cocci: simplify multiplicaction / division by 1

This commit is contained in:
Sylvain 2023-01-12 20:51:01 +01:00 committed by Sylvain Becker
parent 57e78f4cf5
commit 9eaea7d661
1 changed files with 13 additions and 2 deletions

View File

@ -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;