Use nullptr (C++11) instead of zero (0) as the null pointer constant #10645

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:welcome-nullptr-goodbye-0 changing 16 files +41 −41
  1. practicalswift commented at 7:12 pm on June 21, 2017: contributor

    Use nullptr instead of zero (0) as the null pointer constant.

    The road towards nullptr (C++11) is split into two PRs:

    • NULLnullptr is handled in PR #10483 (scripted)
    • 0nullptr is handled in PR #10645 (manual, this PR)

    By using the C++11 keyword nullptr we are guaranteed a prvalue of type std::nullptr_t.

    For a more thorough discussion, see “A name for the null pointer: nullptr” (Sutter & Stroustrup), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf

  2. practicalswift force-pushed on Jun 21, 2017
  3. practicalswift renamed this:
    Use nullptr instead of zero (0) as the null pointer constant
    Use nullptr (C++11) instead of zero (0) as the null pointer constant
    on Jun 21, 2017
  4. fanquake added the label Refactoring on Jun 21, 2017
  5. jtimon commented at 1:26 am on June 22, 2017: contributor
    utACK a0fbff2c8c0621d2ef4759078b3c690f1c33748b
  6. gmaxwell commented at 6:37 pm on June 22, 2017: contributor
    Concept ACK
  7. practicalswift force-pushed on Jun 22, 2017
  8. practicalswift commented at 7:06 pm on June 22, 2017: contributor
    Rebased!
  9. practicalswift force-pushed on Aug 9, 2017
  10. laanwj referenced this in commit ce74799a3c on Aug 14, 2017
  11. practicalswift force-pushed on Aug 14, 2017
  12. practicalswift commented at 3:40 pm on August 14, 2017: contributor
    @laanwj Thanks for merging the NULL → nullptr PR (#10483). This PR handles the case 0 → nullptr and has now been rebased on top of master.
  13. dcousens approved
  14. in src/tinyformat.h:901 in f71710dad4 outdated
    897@@ -898,7 +898,7 @@ class FormatListN : public FormatList
    898 // Special 0-arg version - MSVC says zero-sized C array in struct is nonstandard
    899 template<> class FormatListN<0> : public FormatList
    900 {
    901-    public: FormatListN() : FormatList(0, 0) {}
    902+    public: FormatListN() : FormatList(nullptr, 0) {}
    


    jnewbery commented at 9:03 pm on August 15, 2017:
    There may be an argument to not making style changes to tinyformat.h, which occasionally pulls in changes from upstream. Don’t know what @laanwj’s view is on this?

    laanwj commented at 8:10 am on August 16, 2017:

    Agree, we should generally minimize changes to tinyformat.h, and if it is just style it just adds burden on us with no clear gain.

    If you get upstream to accept this it’s okay with me. But I think they want to keep compatiblity with older C++.

  15. jnewbery commented at 9:03 pm on August 15, 2017: member

    Tested ACK f71710dad454f5afe431479d0aea578b36d68206. Looks good @practicalswift . Thanks for doing this!

    One open question for @laanwj

  16. Use nullptr instead of zero (0) as the null pointer constant 36d326e8b0
  17. practicalswift force-pushed on Aug 16, 2017
  18. practicalswift commented at 8:25 am on August 16, 2017: contributor
    @jnewbery @laanwj Good point! The change to src/tinyformat.h is no longer included in this PR.
  19. MarcoFalke merged this on Aug 16, 2017
  20. MarcoFalke closed this on Aug 16, 2017

  21. MarcoFalke referenced this in commit c484ec6c9b on Aug 16, 2017
  22. laanwj referenced this in commit 9e00a625b4 on Aug 18, 2017
  23. PastaPastaPasta referenced this in commit aa160709d0 on Sep 19, 2019
  24. PastaPastaPasta referenced this in commit 3eda56fff5 on Sep 19, 2019
  25. PastaPastaPasta referenced this in commit 51801c02f9 on Sep 23, 2019
  26. PastaPastaPasta referenced this in commit 91ac93c63f on Sep 23, 2019
  27. PastaPastaPasta referenced this in commit b041cb30d7 on Sep 24, 2019
  28. PastaPastaPasta referenced this in commit c2171001d5 on Sep 24, 2019
  29. PastaPastaPasta referenced this in commit 5c6bd04c1c on Nov 19, 2019
  30. PastaPastaPasta referenced this in commit 77523f121f on Nov 19, 2019
  31. PastaPastaPasta referenced this in commit b19a6a64ed on Nov 21, 2019
  32. PastaPastaPasta referenced this in commit 1d3f9a70b8 on Nov 21, 2019
  33. PastaPastaPasta referenced this in commit be02c92f72 on Dec 9, 2019
  34. PastaPastaPasta referenced this in commit 47a0b82324 on Dec 9, 2019
  35. PastaPastaPasta referenced this in commit 38bb8a8909 on Jan 1, 2020
  36. PastaPastaPasta referenced this in commit 1b943d67ea on Jan 1, 2020
  37. PastaPastaPasta referenced this in commit 9d58c98753 on Jan 2, 2020
  38. PastaPastaPasta referenced this in commit a5ee45e8f7 on Jan 2, 2020
  39. PastaPastaPasta referenced this in commit ab52753cc2 on Jan 2, 2020
  40. PastaPastaPasta referenced this in commit 87a6d62f21 on Jan 2, 2020
  41. PastaPastaPasta referenced this in commit d737b59d45 on Jan 2, 2020
  42. PastaPastaPasta referenced this in commit 6984c98882 on Jan 3, 2020
  43. str4d referenced this in commit e591f94fcf on Jul 31, 2020
  44. zkbot referenced this in commit 5ef5d8d268 on Jul 31, 2020
  45. zkbot referenced this in commit 7d94064616 on Sep 29, 2020
  46. ckti referenced this in commit d7d0d4db21 on Mar 28, 2021
  47. ckti referenced this in commit eb7e61ccae on Mar 28, 2021
  48. practicalswift deleted the branch on Apr 10, 2021
  49. gades referenced this in commit e1ff51567c on Jun 24, 2021
  50. gades referenced this in commit 651b72418a on Jun 26, 2021
  51. gades referenced this in commit 4a3bc05874 on Jan 29, 2022
  52. gades referenced this in commit 4dd3ea416b on Feb 22, 2022
  53. DrahtBot locked this on Aug 18, 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: 2024-12-19 03:12 UTC

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