This is a header cleanup after #20788.
Cleanup headers after #20788 #22952
pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:210911-headers changing 2 files +5 −5-
hebasto commented at 9:14 AM on September 11, 2021: member
-
Cleanup headers after #20788 3174425255
- DrahtBot added the label P2P on Sep 11, 2021
- DrahtBot added the label Utils/log/libs on Sep 11, 2021
- MarcoFalke removed the label P2P on Sep 11, 2021
- MarcoFalke removed the label Utils/log/libs on Sep 11, 2021
- MarcoFalke added the label Refactoring on Sep 11, 2021
-
vasild commented at 10:47 AM on September 13, 2021: member
Just out of curiosity - what drove you to do this change? Did you use some tool which suggested these changes?
It is somewhat difficult to asses whether removing
#include <asysheader>fromfoo.cppis justified - how to check thatfoo.cppis not using any of the functions from that header?I see why
<codecvt>was moved fromnetbase.cpptoutil/sock.cpp- the windows-only variant ofNetworkErrorString()is usingstd::codecvt_utf8_utf16and that function was moved fromnetbase.cpptoutil/sock.cpp(but the header was not moved).Why remove
<cwchar>fromutil/sock.cpp? Looks like in order to confirm this change is legit one has to verify that none of the symbols from https://en.cppreference.com/w/cpp/header/cwchar are used inutil/sock.cpp. Is there an easy way to do that?Same for making
<locale>windows-only. How to check that non-windows code is not using any of its symbols? -
hebasto commented at 11:09 AM on September 13, 2021: member
Just out of curiosity - what drove you to do this change?
Reading dec9b5e850c6aad989e814aea5b630b36f55d580 commit while working on #20744.
Did you use some tool which suggested these changes?
No. The added code is short enough to manually verify need of
#include <cwchar>and#include <locale>.Why remove
<cwchar>fromutil/sock.cpp?Why was it added in dec9b5e850c6aad989e814aea5b630b36f55d580? I see no reason for that.
Same for making
<locale>windows-only. How to check that non-windows code is not using any of its symbols?Same. I see no reason to
#include <locale>for non-Windows platforms in dec9b5e850c6aad989e814aea5b630b36f55d580. - vasild approved
-
vasild commented at 11:03 AM on September 14, 2021: member
ACK 317442525586ba9ff8b9af6c506b48f87cd8cd87
Alright, thanks for the clarifications, @hebasto. I don't remember why I added
<cwchar>, surely it was not without a reason, maybe some windows CI failed on me. Anyway, now it looks like it is not needed and CI is green.Is it time to integrate https://include-what-you-use.org/ into the project?
- MarcoFalke added the label DrahtBot Guix build requested on Sep 14, 2021
-
hebasto commented at 12:11 PM on September 14, 2021: member
Is it time to integrate https://include-what-you-use.org/ into the project?
-
DrahtBot commented at 5:12 PM on September 15, 2021: member
<!--9cd9c72976c961c55c7acef8f6ba82cd-->
Guix builds
- DrahtBot removed the label DrahtBot Guix build requested on Sep 15, 2021
- MarcoFalke referenced this in commit ec7ec69c7b on Sep 16, 2021
-
DrahtBot commented at 7:40 AM on September 16, 2021: member
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>
- DrahtBot added the label Needs rebase on Sep 16, 2021
- fanquake closed this on Sep 16, 2021
- hebasto deleted the branch on Sep 16, 2021
-
MarcoFalke commented at 9:07 AM on September 16, 2021: member
This was merged, but not marked as merged by GitHub.
- sidhujag referenced this in commit c6525c9b58 on Sep 19, 2021
- DrahtBot locked this on Oct 30, 2022