bsf icon indicating copy to clipboard operation
bsf copied to clipboard

Switch from [U]INT# to [u]int#_t

Open jonesmz opened this issue 7 years ago • 2 comments

As we discussed over various pull requests, using the [u]int#_t types from the stdint header can be a nice readability enhancement for the bsf framework codebase.

Since that switch is a very mechanical, but very large, change, I figured I'd forego opening a PR and instead provide a bash-script that'll take care of the grunt work automatically.

So here's how you can rip off the band-aide, if you decide you want to.

find . -name "*[cpp|h]" -exec sed -i 's/INT8/int8_t/g; s/INT16/int16_t/g; s/INT32/int32_t/g; s/INT64/int64_t/g; s/Uint/uint/g' "{}" \;

Of course, that might have some unintentional side effects, e.g. false positive matches and that kind of thing. So take with grain of salt.

jonesmz avatar Jul 11 '18 06:07 jonesmz

Thanks, I'll make use of it when the time comes. (Although since I'm on Windows I might just do regex replace in VS)

BearishSun avatar Jul 11 '18 10:07 BearishSun

+1 for this enhancement. This is one of the main readability issue I have with this (awesome) framework.

athanase avatar Jul 11 '18 14:07 athanase