Prefer (int)a over int(a) #9557

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:avoid-functional-cast-expression changing 9 files +40 −40
  1. practicalswift commented at 9:16 PM on January 14, 2017: contributor

    No description provided.

  2. paveljanik commented at 9:18 PM on January 14, 2017: contributor

    Let's slow down please and let the review part to catch you... thx

  3. fanquake added the label Refactoring on Jan 15, 2017
  4. luke-jr commented at 11:04 PM on January 20, 2017: member

    Where is this deprecated? I prefer the current form... :/

  5. sipa commented at 11:12 PM on January 20, 2017: member

    I don't like C++ style casts for simple integer types. Sure, C-style casts can be dangerous in general, but for simple types there is no such risk, and result in much less cluttered notation.

    <sub>I do prefer (int)a over int(a), though.</sub>

  6. Prefer (int)a over int(a) 5da3f42c75
  7. practicalswift force-pushed on Jan 21, 2017
  8. practicalswift renamed this:
    Use static_cast<new_type>(...) instead of deprecated new_type(...) (functional cast)
    Prefer (int)a over int(a)
    on Jan 21, 2017
  9. practicalswift commented at 11:26 AM on January 21, 2017: contributor

    @sipa PR updated accordingly. Looks OK? :-)

  10. MarcoFalke commented at 11:29 AM on January 21, 2017: member

    Our style guide does not mention what is preferred and it does not seem relevant, so tend to NACK.

  11. practicalswift commented at 9:31 AM on January 22, 2017: contributor

    Closing since consensus seems to be that this change is unnecessary :-)

  12. practicalswift closed this on Jan 22, 2017

  13. practicalswift deleted the branch on Apr 10, 2021
  14. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

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

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