Don't use global (external) symbols for symbols that are used in only one translation unit

This commit is contained in:
practicalswift 2019-05-26 11:01:58 +02:00
parent 03858b23fe
commit 0959d37e3e
4 changed files with 10 additions and 7 deletions

View file

@ -2287,8 +2287,8 @@ public:
WSACleanup(); WSACleanup();
#endif #endif
} }
} };
instance_of_cnetcleanup; static CNetCleanup instance_of_cnetcleanup;
void CConnman::Interrupt() void CConnman::Interrupt()
{ {

View file

@ -4023,4 +4023,5 @@ public:
mapOrphanTransactions.clear(); mapOrphanTransactions.clear();
mapOrphanTransactionsByPrev.clear(); mapOrphanTransactionsByPrev.clear();
} }
} instance_of_cnetprocessingcleanup; };
static CNetProcessingCleanup instance_of_cnetprocessingcleanup;

View file

@ -22,7 +22,8 @@ struct UISignals {
boost::signals2::signal<CClientUIInterface::NotifyBlockTipSig> NotifyBlockTip; boost::signals2::signal<CClientUIInterface::NotifyBlockTipSig> NotifyBlockTip;
boost::signals2::signal<CClientUIInterface::NotifyHeaderTipSig> NotifyHeaderTip; boost::signals2::signal<CClientUIInterface::NotifyHeaderTipSig> NotifyHeaderTip;
boost::signals2::signal<CClientUIInterface::BannedListChangedSig> BannedListChanged; boost::signals2::signal<CClientUIInterface::BannedListChangedSig> BannedListChanged;
} g_ui_signals; };
static UISignals g_ui_signals;
#define ADD_SIGNALS_IMPL_WRAPPER(signal_name) \ #define ADD_SIGNALS_IMPL_WRAPPER(signal_name) \
boost::signals2::connection CClientUIInterface::signal_name##_connect(std::function<signal_name##Sig> fn) \ boost::signals2::connection CClientUIInterface::signal_name##_connect(std::function<signal_name##Sig> fn) \

View file

@ -78,7 +78,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIn
return false; return false;
} }
CChainState g_chainstate; static CChainState g_chainstate;
CChainState& ChainstateActive() { return g_chainstate; } CChainState& ChainstateActive() { return g_chainstate; }
@ -1049,7 +1049,7 @@ bool CChainState::IsInitialBlockDownload() const
return false; return false;
} }
CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr; static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
static void AlertNotify(const std::string& strMessage) static void AlertNotify(const std::string& strMessage)
{ {
@ -4762,4 +4762,5 @@ public:
delete (*it1).second; delete (*it1).second;
mapBlockIndex.clear(); mapBlockIndex.clear();
} }
} instance_of_cmaincleanup; };
static CMainCleanup instance_of_cmaincleanup;