Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod obu: Cleanup part 1 #590

Merged
merged 47 commits into from
Dec 2, 2023
Merged

mod obu: Cleanup part 1 #590

merged 47 commits into from
Dec 2, 2023

Conversation

kkysen
Copy link
Collaborator

@kkysen kkysen commented Nov 27, 2023

Main cleanups so far:

  • Make args refs.
  • Make some vars refs.
  • Remove redundant as casts.
  • Remove redundant type annotations.
  • Remove .wrapping_* calls.
  • Translate for loops.
  • Use indexing for arrays.
  • Add back comments.

@kkysen kkysen requested a review from randomPoison November 27, 2023 07:08
@kkysen kkysen force-pushed the kkysen/struct-Rav1dIntraPredDSPContext-cfl_ac-enum_map branch from 61e77a0 to f54bf19 Compare November 29, 2023 07:18
@kkysen kkysen force-pushed the kkysen/cleanup-mod-obu branch from 38a1ef3 to 42be0bc Compare November 29, 2023 07:19
@kkysen kkysen force-pushed the kkysen/struct-Rav1dIntraPredDSPContext-cfl_ac-enum_map branch from f54bf19 to d18b3a5 Compare November 29, 2023 07:47
@kkysen kkysen force-pushed the kkysen/cleanup-mod-obu branch 2 times, most recently from 02da7ed to 68ea52d Compare November 30, 2023 05:32
@kkysen kkysen changed the base branch from kkysen/struct-Rav1dIntraPredDSPContext-cfl_ac-enum_map to main November 30, 2023 05:34
@kkysen kkysen force-pushed the kkysen/cleanup-mod-obu branch 2 times, most recently from 270f2d0 to bc827e4 Compare November 30, 2023 09:22
`([0-9]+) as ([A-Za-z0-9_]+) as ([A-Za-z0-9_]+)` => `$1 as $3`.
`\(([0-9]+) as ([A-Za-z0-9_]+)\)([^.])` => `($1)$3`.
`, ([0-9]+) as ([A-Za-z0-9_]+)` => `, $1`.
`= ([0-9]+) as ([A-Za-z0-9_]+);` => `= $1;`.
`(==|!=|&) ([0-9]+) as ([A-Za-z0-9_]+)` => `$1 $2`.
`([0-9]+) as ([A-Za-z0-9_]+),` => `$1,`.
Also remove some redundant parentheses.
@kkysen kkysen force-pushed the kkysen/cleanup-mod-obu branch from bc827e4 to 6c6bce2 Compare November 30, 2023 19:54
Copy link
Collaborator

@rinon rinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't carefully read every line of this, so I'm relying on testing to catch any typos or other mistakes, but everything I can see that you're doing here looks fine to me.

src/obu.rs Show resolved Hide resolved
@kkysen kkysen merged commit 3bc2e0b into main Dec 2, 2023
18 checks passed
@kkysen kkysen deleted the kkysen/cleanup-mod-obu branch December 2, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants