Skip to content

internal/buffer: use switch-case vs ifs in 1-6 width (u)int read/write calls

Rodrigo Muino Tomonari requested to merge github/fork/ZaneHannanAU/patch-4 into master

Additionally reorganises the return statements to be decremental to increase readability; and removes blank/dupe lines.

Minor v8 optimisation as well due to the use of switch statements vs if-chaining; as well as a shorter; denser codebase.

I'm not sure on our thoughts on switch()-case vs if()-expr so it's primarily nitpicking.

Checklist

Merge request reports

Loading