No description provided.
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-
Diapolo commented at 8:49 AM on October 31, 2015: none
-
remove unneeded include from rpcserver.cpp and rpcclient.cpp 3c8f99fa2a
-
MarcoFalke commented at 9:24 AM on October 31, 2015: member
utACK
-
laanwj commented at 9:48 AM on October 31, 2015: member
Not sure about this.
rpcserverandrpcclientclearly depend on univalue, so this will just make the dependencies more fuzzy. -
paveljanik commented at 10:36 AM on October 31, 2015: contributor
You can ping-pong this include between in
.cppand.hor 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.
-
dcousens commented at 10:59 AM on October 31, 2015: contributor
NACKActually, its already defined in the
.h, ACK. -
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.
- laanwj closed this on Oct 31, 2015
-
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.
-
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.
-
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
#ifdefguard) 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. - DrahtBot locked this on Sep 8, 2021