Denote functions CNode::GetRecvVersion() and CNode::GetRefCount() as const #10471

pull pavlosantoniou wants to merge 1 commits into bitcoin:master from pavlosantoniou:master changing 1 files +2 −2
  1. pavlosantoniou commented at 3:36 PM on May 28, 2017: contributor

    CNode::GetRecvVersion() is now denoted as const CNode::GetRefCount() is also now denoted as const, after a PR comment

  2. fanquake added the label P2P on May 29, 2017
  3. practicalswift commented at 2:56 PM on May 29, 2017: contributor

    ACK e9ce6ff

    Related PR: #9964 ("Add const to methods that do not modify the object for which it is called") @pavlosantoniou, welcome as a contributor!

  4. fanquake commented at 2:31 AM on May 31, 2017: member

    utACK e9ce6ff

  5. theuni commented at 3:26 PM on May 31, 2017: member

    utACK e9ce6ff5dfa0effa484e723cab107941756648f8

  6. in src/net.h:726 in e9ce6ff5df outdated
     722 | @@ -723,7 +723,7 @@ class CNode
     723 |      {
     724 |          nRecvVersion = nVersionIn;
     725 |      }
     726 | -    int GetRecvVersion()
     727 | +    int GetRecvVersion() const
    


    laanwj commented at 8:11 AM on June 1, 2017:

    Change seems fine to me, but why just this function? To avoid a PR per function might be a bit more thorough and do this for the entire class. E.g. it looks like GetRefCount above, for example, is also missing const?


    pavlosantoniou commented at 10:38 AM on June 1, 2017:

    Done, a commit for GetRefCount() is now part of the same PR

  7. pavlosantoniou renamed this:
    Denote function CNode::GetRecvVersion() as const
    Denote functions CNode::GetRecvVersion() and CNode::GetRefCount() as const
    on Jun 1, 2017
  8. fanquake commented at 1:48 PM on June 1, 2017: member

    Please squash the merge commits.

  9. pavlosantoniou force-pushed on Jun 1, 2017
  10. pavlosantoniou commented at 2:42 PM on June 1, 2017: contributor

    I am a bit confused with the squashing process. How should I fix the current state of the PR?

  11. MarcoFalke commented at 3:01 PM on June 1, 2017: member

    git merge upstream/master git reset --soft upstream/master git commit -m 'net: Denote some CNode functions const' git push origin master -f

    On Thu, Jun 1, 2017 at 4:42 PM, pavlosantoniou notifications@github.com wrote:

    I am a bit confused with the squashing process. How should I fix the current state of the PR?

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/pull/10471#issuecomment-305514764, or mute the thread https://github.com/notifications/unsubscribe-auth/AGGmv2xH1ZxycuiphBlagf5X-t5WTGbJks5r_s3ngaJpZM4NoraK .

  12. net: Denote some CNode functions const 5f672ca8c1
  13. pavlosantoniou force-pushed on Jun 1, 2017
  14. pavlosantoniou commented at 3:22 PM on June 1, 2017: contributor

    Thank you! The commits are squashed now.

  15. practicalswift commented at 7:28 PM on June 3, 2017: contributor

    ACK 5f672ca8c134181a6e7afc0c5036df01b8f7ae28

  16. sipa merged this on Jun 4, 2017
  17. sipa closed this on Jun 4, 2017

  18. sipa referenced this in commit 400fdd08cc on Jun 4, 2017
  19. PastaPastaPasta referenced this in commit 455524786d on Jun 20, 2019
  20. PastaPastaPasta referenced this in commit 03d0b6ab49 on Jun 20, 2019
  21. PastaPastaPasta referenced this in commit 0a1f55fb3f on Jun 22, 2019
  22. PastaPastaPasta referenced this in commit b3180e9173 on Jun 22, 2019
  23. PastaPastaPasta referenced this in commit be8ad299da on Jun 22, 2019
  24. PastaPastaPasta referenced this in commit 53715ba400 on Jun 22, 2019
  25. PastaPastaPasta referenced this in commit 31e243e7a7 on Jun 22, 2019
  26. PastaPastaPasta referenced this in commit 78f65a536d on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 4842fd7651 on Jun 22, 2019
  28. PastaPastaPasta referenced this in commit 1659ceaaa2 on Jun 22, 2019
  29. PastaPastaPasta referenced this in commit eae6b41db6 on Jun 22, 2019
  30. PastaPastaPasta referenced this in commit f352434e00 on Jun 22, 2019
  31. PastaPastaPasta referenced this in commit 40cec429b3 on Jun 26, 2019
  32. barrystyle referenced this in commit d67d36be7e on Jan 22, 2020
  33. MarcoFalke locked this on Sep 8, 2021

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-22 09:15 UTC

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