mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
f8befc811c
## Issue being fixed or feature implemented Some headers or modules are used objects from STL without including it directly, it cause compilation failures on some platforms for some specific compilers such as #5554 ## What was done? Added missing includes and removed obsolete includes for `optional`, `deque`, `tuple`, `unordered_set`, `unordered_map`, `set` and `atomic`. Please, note, that this PR doesn't cover all cases, only cases when it is obviously missing or obviously obsolete. Also most of changes belongs to to dash specific code; but for cases of original bitcoin code I keep it untouched, such as missing <map> in `src/psbt.h` I used this script to get a list of files/headers which looks suspicious `./headers-scanner.sh std::optional optional`: ```bash #!/bin/bash set -e function check_includes() { obj=$1 header=$2 file=$3 used=0 included=0 grep "$obj" "$file" >/dev/null 2>/dev/null && used=1 grep "include <$header>" $file >/dev/null 2>/dev/null && included=1 if [ $used == 1 ] && [ $included == 0 ] then echo "missing <$header> in $file" fi if [ $used == 0 ] && [ $included == 1 ] then echo "obsolete <$header> in $file" fi } export -f check_includes obj=$1 header=$2 find src \( -name '*.h' -or -name '*.cpp' -or -name '*.hpp' \) -exec bash -c 'check_includes "$0" "$1" "$2"' "$obj" "$header" {} \; ``` ## How Has This Been Tested? Built code locally ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone |
||
---|---|---|
.. | ||
test | ||
bdb.cpp | ||
bdb.h | ||
coincontrol.cpp | ||
coincontrol.h | ||
coinselection.cpp | ||
coinselection.h | ||
context.cpp | ||
context.h | ||
crypter.cpp | ||
crypter.h | ||
db.cpp | ||
db.h | ||
fees.cpp | ||
fees.h | ||
init.cpp | ||
interfaces.cpp | ||
ismine.h | ||
load.cpp | ||
load.h | ||
rpcdump.cpp | ||
rpcwallet.cpp | ||
rpcwallet.h | ||
salvage.cpp | ||
salvage.h | ||
scriptpubkeyman.cpp | ||
scriptpubkeyman.h | ||
sqlite.cpp | ||
sqlite.h | ||
wallet.cpp | ||
wallet.h | ||
walletdb.cpp | ||
walletdb.h | ||
wallettool.cpp | ||
wallettool.h | ||
walletutil.cpp | ||
walletutil.h |