Fix issues when calling std::move(const&) #25872

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2208-const-move-📔 changing 15 files +28 −27
  1. MarcoFalke commented at 9:12 am on August 19, 2022: member

    Passing a symbol to std::move that is marked const is a no-op, which can be fixed in two ways:

    • Remove the const, or
    • Remove the std::move
  2. MarcoFalke added the label Refactoring on Aug 19, 2022
  3. MarcoFalke force-pushed on Aug 19, 2022
  4. MarcoFalke force-pushed on Aug 19, 2022
  5. MarcoFalke force-pushed on Aug 19, 2022
  6. MarcoFalke force-pushed on Aug 19, 2022
  7. MarcoFalke force-pushed on Aug 19, 2022
  8. DrahtBot commented at 12:47 pm on August 19, 2022: contributor

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25714 (univalue: Avoid std::string copies by MarcoFalke)
    • #24897 ([Draft / POC] Silent Payments by w0xlt)

    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. DrahtBot added the label Needs rebase on Aug 19, 2022
  10. Fix issues when calling std::move(const&) faad673716
  11. Fix iwyu fa875349e2
  12. MarcoFalke force-pushed on Aug 20, 2022
  13. DrahtBot removed the label Needs rebase on Aug 20, 2022
  14. fanquake requested review from ryanofsky on Aug 22, 2022
  15. in src/.clang-tidy:8 in fa875349e2
    4@@ -5,6 +5,7 @@ misc-unused-using-decls,
    5 modernize-use-default-member-init,
    6 modernize-use-nullptr,
    7 performance-for-range-copy,
    8+performance-move-const-arg,
    


    Sjors commented at 2:27 pm on August 22, 2022:
    Good idea to add this.
  16. MarcoFalke commented at 6:43 am on August 25, 2022: member
    Locally, on aarch64, I see that the BlockToJsonVerbose benchmark is about 2% faster. Also, for some unknown reason, the BlockToJsonVerboseWrite bench uses 5% less memory?
  17. ryanofsky approved
  18. ryanofsky commented at 7:16 pm on August 26, 2022: contributor
    Code review ACK fa875349e22f2f0f9c2c98ee991372d08ff90318. Looks good. Good for univalue to support c++11 move optimizations
  19. fanquake merged this on Aug 31, 2022
  20. fanquake closed this on Aug 31, 2022

  21. MarcoFalke deleted the branch on Sep 1, 2022
  22. sidhujag referenced this in commit 9600c3bb20 on Sep 1, 2022
  23. PastaPastaPasta referenced this in commit 264de42875 on Oct 18, 2022
  24. bitcoin locked this on Sep 1, 2023

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-07-03 10:13 UTC

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