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
  1. gmaxwell commented at 2:22 AM on March 28, 2015: contributor

    No description provided.

  2. Avoid some implicit type conversions to make C++ compilers happy. c01df1adc9
  3. 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.

  4. 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)

  5. dcousens commented at 12:52 AM on March 29, 2015: contributor

    @gmaxwell ah! Sorry, I completely forgot about that, just context switched and read C++ in the title. Cheers for clearing that up :)

  6. sipa merged this on Mar 29, 2015
  7. sipa closed this on Mar 29, 2015

  8. sipa referenced this in commit d5b53aa818 on Mar 29, 2015

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me