Thyme icon indicating copy to clipboard operation
Thyme copied to clipboard

Switch all int types to int32_t

Open duncanspumpkin opened this issue 3 years ago • 6 comments

Little refactor to simplify things

duncanspumpkin avatar Feb 19 '22 12:02 duncanspumpkin

I don't see that this is necessary. On all platforms that we are ever likely to bump into (given that Thyme is never going to run on a Cray supercomputer) int and int32_t are identical in size and totally interchangeable.

int vs int32_t, uint vs uint32_t, short vs int16_t, ushort vs uint16_t, char vs int8_t, unsigned char vs uint8_t will make no difference to the code on the platforms we are ever going to run on.

jonwil avatar Feb 19 '22 20:02 jonwil

We have already had situations where the wrong size is used due to long. It seems silly to have this issue when it's easily fixed by using the sized types

duncanspumpkin avatar Feb 19 '22 22:02 duncanspumpkin

Can we do this in chunks? Reviewing 560 files is quite much.

xezon avatar Feb 20 '22 08:02 xezon

Can we do this in chunks? Reviewing 560 files is quite much.

Certainly can do. I wasn't sure if it was easier for a review doing all of one type at a time or all types in one folder of files at a time

duncanspumpkin avatar Feb 20 '22 16:02 duncanspumpkin

Must not be submitted, if ever, before

  • #586
  • #620

xezon avatar Mar 09 '22 08:03 xezon

Must not be submitted, if ever, before

Why?

This just resolves all of it in a oner using a find and replace it can be done at any time and takes all of a couple of seconds to do + a little bit of massaging clang format. Unless you are just saying your prs will be a bit annoying to rebase?

duncanspumpkin avatar Mar 09 '22 09:03 duncanspumpkin