No description provided.
Avoid some implicit type conversions to make C++ compilers happy. #232
pull gmaxwell wants to merge 1 commits into bitcoin-core:master from gmaxwell:cpp-compat changing 4 files +9 −9-
gmaxwell commented at 2:22 AM on March 28, 2015: contributor
-
Avoid some implicit type conversions to make C++ compilers happy. c01df1adc9
-
dcousens commented at 11:42 PM on March 28, 2015: contributor
@gmaxwell any reason for C style casts?
I understand that the typical argument might be because they require less work, but if you are going to the effort of doing https://github.com/bitcoin/secp256k1/pull/230, then using C++ style casts correctly seems like a pretty straight forward rule to adhere to as well.
-
gmaxwell commented at 12:33 AM on March 29, 2015: contributor
@dcousens Because this software is written in strict C89 (plus a couple of narrow additions like long long).
The reason for this change is that someone may still compile it with a C++ compiler because that is all they have available or some other reason (e.g. they have some analysis or instrumentation code that is C++ only), and there is no reason to be gratuitously incompatible. (With this change it compiles as C++, without it, it doesn't)
- sipa merged this on Mar 29, 2015
- sipa closed this on Mar 29, 2015
- sipa referenced this in commit d5b53aa818 on Mar 29, 2015