Browse Source

Replace includes of boost/filesystem.h with fs.h

This is step one in abstracting the use of boost::filesystem.
pull/1/head
Wladimir J. van der Laan 6 years ago
parent
commit
7d5172d354
  1. 2
      src/addrdb.cpp
  2. 2
      src/addrdb.h
  3. 2
      src/bitcoin-cli.cpp
  4. 2
      src/bitcoind.cpp
  5. 3
      src/dbwrapper.cpp
  6. 3
      src/dbwrapper.h
  7. 2
      src/init.cpp
  8. 2
      src/net.h
  9. 2
      src/qt/bitcoin.cpp
  10. 4
      src/qt/guiutil.cpp
  11. 3
      src/qt/guiutil.h
  12. 3
      src/qt/intro.cpp
  13. 3
      src/qt/test/rpcnestedtests.cpp
  14. 3
      src/rpc/protocol.h
  15. 2
      src/rpc/server.cpp
  16. 2
      src/test/test_bitcoin.cpp
  17. 2
      src/test/test_bitcoin.h
  18. 2
      src/test/testutil.cpp
  19. 2
      src/test/testutil.h
  20. 3
      src/util.cpp
  21. 2
      src/util.h
  22. 3
      src/validation.cpp
  23. 2
      src/validation.h
  24. 2
      src/wallet/db.cpp
  25. 3
      src/wallet/db.h
  26. 2
      src/wallet/wallet.cpp
  27. 2
      src/wallet/walletdb.cpp

2
src/addrdb.cpp

@ -8,13 +8,13 @@ @@ -8,13 +8,13 @@
#include "addrman.h"
#include "chainparams.h"
#include "clientversion.h"
#include "fs.h"
#include "hash.h"
#include "random.h"
#include "streams.h"
#include "tinyformat.h"
#include "util.h"
#include <boost/filesystem.hpp>
CBanDB::CBanDB()
{

2
src/addrdb.h

@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
#ifndef BITCOIN_ADDRDB_H
#define BITCOIN_ADDRDB_H
#include "fs.h"
#include "serialize.h"
#include <string>
#include <map>
#include <boost/filesystem/path.hpp>
class CSubNet;
class CAddrMan;

2
src/bitcoin-cli.cpp

@ -9,12 +9,12 @@ @@ -9,12 +9,12 @@
#include "chainparamsbase.h"
#include "clientversion.h"
#include "fs.h"
#include "rpc/client.h"
#include "rpc/protocol.h"
#include "util.h"
#include "utilstrencodings.h"
#include <boost/filesystem/operations.hpp>
#include <stdio.h>
#include <event2/buffer.h>

2
src/bitcoind.cpp

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
#include "chainparams.h"
#include "clientversion.h"
#include "compat.h"
#include "fs.h"
#include "rpc/server.h"
#include "init.h"
#include "noui.h"
@ -20,7 +21,6 @@ @@ -20,7 +21,6 @@
#include "utilstrencodings.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
#include <stdio.h>

3
src/dbwrapper.cpp

@ -4,11 +4,10 @@ @@ -4,11 +4,10 @@
#include "dbwrapper.h"
#include "fs.h"
#include "util.h"
#include "random.h"
#include <boost/filesystem.hpp>
#include <leveldb/cache.h>
#include <leveldb/env.h>
#include <leveldb/filter_policy.h>

3
src/dbwrapper.h

@ -6,14 +6,13 @@ @@ -6,14 +6,13 @@
#define BITCOIN_DBWRAPPER_H
#include "clientversion.h"
#include "fs.h"
#include "serialize.h"
#include "streams.h"
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
#include <boost/filesystem/path.hpp>
#include <leveldb/db.h>
#include <leveldb/write_batch.h>

2
src/init.cpp

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
#include "checkpoints.h"
#include "compat/sanity.h"
#include "consensus/validation.h"
#include "fs.h"
#include "httpserver.h"
#include "httprpc.h"
#include "key.h"
@ -56,7 +57,6 @@ @@ -56,7 +57,6 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#include <boost/thread.hpp>

2
src/net.h

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "amount.h"
#include "bloom.h"
#include "compat.h"
#include "fs.h"
#include "hash.h"
#include "limitedmap.h"
#include "netaddress.h"
@ -32,7 +33,6 @@ @@ -32,7 +33,6 @@
#include <arpa/inet.h>
#endif
#include <boost/filesystem/path.hpp>
#include <boost/foreach.hpp>
#include <boost/signals2/signal.hpp>

2
src/qt/bitcoin.cpp

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
#include "chainparams.h"
#include "clientmodel.h"
#include "fs.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "intro.h"
@ -38,7 +39,6 @@ @@ -38,7 +39,6 @@
#include <stdint.h>
#include <boost/filesystem/operations.hpp>
#include <boost/thread.hpp>
#include <QApplication>

4
src/qt/guiutil.cpp

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include "qvalidatedlineedit.h"
#include "walletmodel.h"
#include "fs.h"
#include "primitives/transaction.h"
#include "init.h"
#include "policy/policy.h"
@ -35,9 +36,6 @@ @@ -35,9 +36,6 @@
#include "shlwapi.h"
#endif
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#include <boost/scoped_array.hpp>
#include <QAbstractItemView>

3
src/qt/guiutil.h

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#define BITCOIN_QT_GUIUTIL_H
#include "amount.h"
#include "fs.h"
#include <QEvent>
#include <QHeaderView>
@ -16,8 +17,6 @@ @@ -16,8 +17,6 @@
#include <QTableView>
#include <QLabel>
#include <boost/filesystem.hpp>
class QValidatedLineEdit;
class SendCoinsRecipient;

3
src/qt/intro.cpp

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "config/bitcoin-config.h"
#endif
#include "fs.h"
#include "intro.h"
#include "ui_intro.h"
@ -13,8 +14,6 @@ @@ -13,8 +14,6 @@
#include "util.h"
#include <boost/filesystem.hpp>
#include <QFileDialog>
#include <QSettings>
#include <QMessageBox>

3
src/qt/test/rpcnestedtests.cpp

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "chainparams.h"
#include "consensus/validation.h"
#include "fs.h"
#include "validation.h"
#include "rpc/register.h"
#include "rpc/server.h"
@ -17,8 +18,6 @@ @@ -17,8 +18,6 @@
#include <QDir>
#include <QtGlobal>
#include <boost/filesystem.hpp>
static UniValue rpcNestedTest_rpc(const JSONRPCRequest& request)
{
if (request.fHelp) {

3
src/rpc/protocol.h

@ -6,11 +6,12 @@ @@ -6,11 +6,12 @@
#ifndef BITCOIN_RPCPROTOCOL_H
#define BITCOIN_RPCPROTOCOL_H
#include "fs.h"
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include <boost/filesystem.hpp>
#include <univalue.h>

2
src/rpc/server.cpp

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "rpc/server.h"
#include "base58.h"
#include "fs.h"
#include "init.h"
#include "random.h"
#include "sync.h"
@ -16,7 +17,6 @@ @@ -16,7 +17,6 @@
#include <univalue.h>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals2/signal.hpp>

2
src/test/test_bitcoin.cpp

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
#include "chainparams.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "fs.h"
#include "key.h"
#include "validation.h"
#include "miner.h"
@ -24,7 +25,6 @@ @@ -24,7 +25,6 @@
#include <memory>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
FastRandomContext insecure_rand_ctx(true);

2
src/test/test_bitcoin.h

@ -6,12 +6,12 @@ @@ -6,12 +6,12 @@
#define BITCOIN_TEST_TEST_BITCOIN_H
#include "chainparamsbase.h"
#include "fs.h"
#include "key.h"
#include "pubkey.h"
#include "txdb.h"
#include "txmempool.h"
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
/** Basic testing setup.

2
src/test/testutil.cpp

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
#include <shlobj.h>
#endif
#include <boost/filesystem.hpp>
#include "fs.h"
boost::filesystem::path GetTempPath() {
return boost::filesystem::temp_directory_path();

2
src/test/testutil.h

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
#ifndef BITCOIN_TEST_TESTUTIL_H
#define BITCOIN_TEST_TESTUTIL_H
#include <boost/filesystem/path.hpp>
#include "fs.h"
boost::filesystem::path GetTempPath();

3
src/util.cpp

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
#include "util.h"
#include "chainparamsbase.h"
#include "fs.h"
#include "random.h"
#include "serialize.h"
#include "sync.h"
@ -79,8 +80,6 @@ @@ -79,8 +80,6 @@
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>

2
src/util.h

@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
#endif
#include "compat.h"
#include "fs.h"
#include "tinyformat.h"
#include "utiltime.h"
@ -25,7 +26,6 @@ @@ -25,7 +26,6 @@
#include <string>
#include <vector>
#include <boost/filesystem/path.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp>

3
src/validation.cpp

@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
#include "consensus/consensus.h"
#include "consensus/merkle.h"
#include "consensus/validation.h"
#include "fs.h"
#include "hash.h"
#include "init.h"
#include "policy/fees.h"
@ -41,8 +42,6 @@ @@ -41,8 +42,6 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/math/distributions/poisson.hpp>
#include <boost/thread.hpp>

2
src/validation.h

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
#include "amount.h"
#include "chain.h"
#include "coins.h"
#include "fs.h"
#include "protocol.h" // For CMessageHeader::MessageStartChars
#include "script/script_error.h"
#include "sync.h"
@ -30,7 +31,6 @@ @@ -30,7 +31,6 @@
#include <atomic>
#include <boost/unordered_map.hpp>
#include <boost/filesystem/path.hpp>
class CBlockIndex;
class CBlockTreeDB;

2
src/wallet/db.cpp

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "db.h"
#include "addrman.h"
#include "fs.h"
#include "hash.h"
#include "protocol.h"
#include "util.h"
@ -17,7 +18,6 @@ @@ -17,7 +18,6 @@
#include <sys/stat.h>
#endif
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/thread.hpp>
#include <boost/version.hpp>

3
src/wallet/db.h

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
#define BITCOIN_WALLET_DB_H
#include "clientversion.h"
#include "fs.h"
#include "serialize.h"
#include "streams.h"
#include "sync.h"
@ -16,8 +17,6 @@ @@ -16,8 +17,6 @@
#include <string>
#include <vector>
#include <boost/filesystem/path.hpp>
#include <db_cxx.h>
static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100;

2
src/wallet/wallet.cpp

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "wallet/coincontrol.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "fs.h"
#include "key.h"
#include "keystore.h"
#include "validation.h"
@ -30,7 +31,6 @@ @@ -30,7 +31,6 @@
#include <assert.h>
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
CWallet* pwalletMain = NULL;

2
src/wallet/walletdb.cpp

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
#include "base58.h"
#include "consensus/validation.h"
#include "fs.h"
#include "validation.h" // For CheckTransaction
#include "protocol.h"
#include "serialize.h"
@ -18,7 +19,6 @@ @@ -18,7 +19,6 @@
#include <atomic>
#include <boost/version.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/thread.hpp>

Loading…
Cancel
Save