Code like "(UINT)-1" ends up "(UINT) - 1" which makes me think AStyle misses the fact this is a cast and not an arithmetic operation.
(UINT)-1
(UINT) - 1
UINT is declared as "typedef unsigned int UINT;" in some Windows header in that case.
typedef unsigned int UINT;
Here are more examples with some context: https://github.com/mpc-hc/mpc-hc/commit/bda162010123413744a45ea51aa858febe58f999.
Here is the config we use: https://raw.githubusercontent.com/mpc-hc/mpc-hc/bda162010123413744a45ea51aa858febe58f999/contrib/astyle.ini.
I second this. Using --pad-oper is very complicated with this behavior present.
Fixed in 3.6.3.
Log in to post a comment.
Here are more examples with some context: https://github.com/mpc-hc/mpc-hc/commit/bda162010123413744a45ea51aa858febe58f999.
Here is the config we use: https://raw.githubusercontent.com/mpc-hc/mpc-hc/bda162010123413744a45ea51aa858febe58f999/contrib/astyle.ini.
I second this. Using --pad-oper is very complicated with this behavior present.
Fixed in 3.6.3.