mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 20 forks source link

use more 'const' #69

Closed mmitch closed 2 years ago

mmitch commented 3 years ago

I've sprinkled lots of const over the place. Is this useful?

I've looked a pointers and there are two types of changes:

  1. In far too few places I could switch from struct bar *foo to const struct bar *foo. This should be OK in all cases.
  2. I've also make struct bar *foo into struct bar* const foo. This seems to be possible nearly everywhere, but is it useful in any way?

I feel unsure if I should just remove part 2 (this would be fast, just search & replace). Any thoughts?

codecov[bot] commented 3 years ago

Codecov Report

Merging #69 (7c7212b) into master (533fddf) will not change coverage. The diff coverage is 67.14%.

Impacted Files Coverage Δ
gbs.c 29.92% <52.94%> (ø)
gbcpu.c 64.96% <69.31%> (ø)
gbhw.c 72.14% <80.00%> (ø)
cfgparser.c 80.17% <83.33%> (ø)
common.h 66.66% <100.00%> (ø)
plugout.c 33.33% <100.00%> (ø)