Skip to content

Commit

Permalink
Merge pull request bitcoin#4349
Browse files Browse the repository at this point in the history
09eb201 Remove `using namespace std` from header file (Wladimir J. van der Laan)
  • Loading branch information
laanwj committed Jun 16, 2014
2 parents 807691c + 09eb201 commit 529047f
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <boost/filesystem/operations.hpp>

using namespace std;
using namespace boost;
using namespace boost::asio;
using namespace json_spirit;
Expand Down
1 change: 1 addition & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <boost/assign/list_of.hpp>

using namespace std;
using namespace boost::assign;

//
Expand Down
22 changes: 10 additions & 12 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@

#include <vector>

using namespace std;

typedef unsigned char MessageStartChars[MESSAGE_START_SIZE];

struct CDNSSeedData {
string name, host;
CDNSSeedData(const string &strName, const string &strHost) : name(strName), host(strHost) {}
std::string name, host;
CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {}
};

/**
Expand Down Expand Up @@ -51,7 +49,7 @@ class CChainParams

const uint256& HashGenesisBlock() const { return hashGenesisBlock; }
const MessageStartChars& MessageStart() const { return pchMessageStart; }
const vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
int GetDefaultPort() const { return nDefaultPort; }
const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
Expand All @@ -74,39 +72,39 @@ class CChainParams
bool RequireStandard() const { return fRequireStandard; }
/* Make standard checks */
bool RPCisTestNet() const { return fRPCisTestNet; }
const string& DataDir() const { return strDataDir; }
const std::string& DataDir() const { return strDataDir; }
/* Make miner stop after a block is found. In RPC, don't return
* until nGenProcLimit blocks are generated */
bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
Network NetworkID() const { return networkID; }
/* Return the BIP70 network string (main, test or regtest) */
std::string NetworkIDString() const { return strNetworkID; }
const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
const vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
int RPCPort() const { return nRPCPort; }
protected:
CChainParams() {}

uint256 hashGenesisBlock;
MessageStartChars pchMessageStart;
// Raw pub key bytes for the broadcast alert signing key.
vector<unsigned char> vAlertPubKey;
std::vector<unsigned char> vAlertPubKey;
int nDefaultPort;
int nRPCPort;
uint256 bnProofOfWorkLimit;
int nSubsidyHalvingInterval;
int nEnforceBlockUpgradeMajority;
int nRejectBlockOutdatedMajority;
int nToCheckBlockUpgradeMajority;
string strDataDir;
std::string strDataDir;
int nMinerThreads;
vector<CDNSSeedData> vSeeds;
std::vector<CDNSSeedData> vSeeds;
std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
Network networkID;
std::string strNetworkID;
CBlock genesis;
vector<CAddress> vFixedSeeds;
std::vector<CAddress> vFixedSeeds;
bool fRequireRPCPassword;
bool fMiningRequiresPeers;
bool fDefaultCheckMemPool;
Expand Down
2 changes: 2 additions & 0 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifdef ENABLE_WALLET
#include "wallet.h"
#endif

using namespace std;
//////////////////////////////////////////////////////////////////////////////
//
// BitcoinMiner
Expand Down
1 change: 1 addition & 0 deletions src/qt/paymentrequestplus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <QDebug>
#include <QSslCertificate>

using namespace std;

class SSLVerifyError : public std::runtime_error
{
Expand Down
2 changes: 1 addition & 1 deletion src/qt/paymentrequestplus.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PaymentRequestPlus
PaymentRequestPlus() { }

bool parse(const QByteArray& data);
bool SerializeToString(string* output) const;
bool SerializeToString(std::string* output) const;

bool IsInitialized() const;
QString getPKIType() const;
Expand Down
1 change: 1 addition & 0 deletions src/qt/paymentserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <QUrlQuery>
#endif

using namespace std;
using namespace boost;

const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
Expand Down
2 changes: 2 additions & 0 deletions src/qt/transactiondesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <stdint.h>
#include <string>

using namespace std;

QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
{
AssertLockHeld(cs_main);
Expand Down
2 changes: 2 additions & 0 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <QSet>
#include <QTimer>

using namespace std;

WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
transactionTableModel(0),
Expand Down

0 comments on commit 529047f

Please sign in to comment.