Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17). #20499

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:remove-nodiscard-cruft changing 18 files +54 −67
  1. practicalswift commented at 9:56 pm on November 25, 2020: contributor
    Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17).
  2. fanquake added the label Refactoring on Nov 26, 2020
  3. fanquake commented at 4:02 am on November 26, 2020: member
    Now that the ifdef forest is removed, is there an advantage to redefining [[nodiscard]] as NODISCARD rather than just using [[nodiscard]] directly where applicable?
  4. scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD
    -BEGIN VERIFY SCRIPT-
    sed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h")
    -END VERIFY SCRIPT-
    4848e71107
  5. Remove NODISCARD 79bff8e48a
  6. practicalswift force-pushed on Nov 26, 2020
  7. practicalswift commented at 9:13 am on November 26, 2020: contributor
    @fanquake No, not at all: I just wanted to keep the diff down. But you have a good point: using [[nodiscard]] directly is certainly nicer and more idiomatic, so it is probably worth the one time cost of a few extra lines of diff. Now doing that using a scripted-diff :)
  8. DrahtBot commented at 2:53 pm on November 26, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20457 (util: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} by practicalswift)
    • #20383 (Avoid signed integer overflow and invalid integer negation when loading malformed mempool.dat files by practicalswift)
    • #14866 ([wip] util: Improve evaluation of includeconf lines in network sections of the config file by AkioNak)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. theStack approved
  10. theStack commented at 4:57 pm on November 29, 2020: member
    ACK 79bff8e48aca961ec271b0d592aca9278b981e2f Checked that all instances of NODISCARD were tackled. It’s always nice to see when old cruft is removed 👍
  11. fanquake approved
  12. fanquake commented at 1:29 pm on November 30, 2020: member
    ACK 79bff8e48aca961ec271b0d592aca9278b981e2f
  13. MarcoFalke merged this on Nov 30, 2020
  14. MarcoFalke closed this on Nov 30, 2020

  15. sidhujag referenced this in commit 888cabec95 on Nov 30, 2020
  16. MarkLTZ referenced this in commit 78c81d94e4 on Feb 16, 2021
  17. practicalswift deleted the branch on Apr 10, 2021
  18. kittywhiskers referenced this in commit ee13fbc81d on Jun 15, 2021
  19. kittywhiskers referenced this in commit f735b2061c on Jun 15, 2021
  20. kittywhiskers referenced this in commit 144086f8d3 on Jun 16, 2021
  21. kittywhiskers referenced this in commit 43d1cbee44 on Jun 25, 2021
  22. kittywhiskers referenced this in commit 7258a700a4 on Jun 25, 2021
  23. kittywhiskers referenced this in commit 3b2bbdcda2 on Jun 27, 2021
  24. kittywhiskers referenced this in commit f2f1843f0c on Jun 27, 2021
  25. UdjinM6 referenced this in commit 7d664c7c53 on Jun 27, 2021
  26. Fabcien referenced this in commit f192773f33 on Jan 26, 2022
  27. gades referenced this in commit 4f580ab9b5 on Apr 29, 2022
  28. MarcoFalke referenced this in commit 66e3b16b8b on May 23, 2022
  29. sidhujag referenced this in commit ec3c4daa31 on May 28, 2022
  30. 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: 2024-12-18 18:12 UTC

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