remove unneded include from rpcserver.cpp and rpcclient.cpp #6920

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:univalue changing 2 files +0 −3
  1. Diapolo commented at 8:49 AM on October 31, 2015: none

    No description provided.

  2. remove unneeded include from rpcserver.cpp and rpcclient.cpp 3c8f99fa2a
  3. MarcoFalke commented at 9:24 AM on October 31, 2015: member

    utACK

  4. laanwj commented at 9:48 AM on October 31, 2015: member

    Not sure about this. rpcserver and rpcclient clearly depend on univalue, so this will just make the dependencies more fuzzy.

  5. paveljanik commented at 10:36 AM on October 31, 2015: contributor

    You can ping-pong this include between in .cpp and .h or have them in both. But who cares? Do we have a recommendation for developers?

    This and all similar issues are a form of DoS on Bitcoin Core development IMO.

  6. dcousens commented at 10:59 AM on October 31, 2015: contributor

    NACK

    Actually, its already defined in the .h, ACK.

  7. laanwj commented at 11:05 AM on October 31, 2015: member

    This and all similar issues are a form of DoS on Bitcoin Core development IMO.

    Agree. NACK, closing.

    Edit: To be clear, I'm with changes like this if they actually break unneeded dependencies.

  8. laanwj closed this on Oct 31, 2015

  9. Diapolo commented at 11:34 AM on October 31, 2015: none

    Guys let another one take care of small stuff like this, my passion is currently over, thanks.

  10. sipa commented at 3:08 PM on October 31, 2015: member

    @paveljanik The intention is that every file #includes all headers which it uses things from, even if that dependency was already indirectly #included through one of its other dependencies.

    A .c file's corresponding .h file is an exception, as they are considered to be one unit. #includes in the .h file do not need to be repeated in the .c file in that case.

  11. laanwj commented at 4:18 PM on October 31, 2015: member

    A .c file's corresponding .h file is an exception, as they are considered to be one unit. #includes in the .h file do not need to be repeated in the .c file in that case.

    Absolutely - it's not necessary, the compilation unit inherits from its own header. But there's nothing wrong with including a dependency headet in both the .h and .c. Compilers will remember which files were already included (and which have the proper #ifdef guard) and won't read them again. So changes like this are a no-op. And I don't think it makes things more readable. It's just not a change worth making IMO.

  12. DrahtBot 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-21 18:15 UTC

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