aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2019-05-26 11:01:58 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2019-06-06 07:45:56 +0200
commit0959d37e3e0f80010a78d175e3846dabf5d35919 (patch)
tree5bf5a0ff6c7887cb53d94febdbadaa7826dfd6cf /src
parent03858b23fe1d17e681eb18d24602b276020295a0 (diff)
Don't use global (external) symbols for symbols that are used in only one translation unit
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp4
-rw-r--r--src/net_processing.cpp3
-rw-r--r--src/ui_interface.cpp3
-rw-r--r--src/validation.cpp7
4 files changed, 10 insertions, 7 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 3c6f5a05f3..75a47d7ad2 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2287,8 +2287,8 @@ public:
WSACleanup();
#endif
}
-}
-instance_of_cnetcleanup;
+};
+static CNetCleanup instance_of_cnetcleanup;
void CConnman::Interrupt()
{
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 3d0a9b192d..2ac4f9d681 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -4023,4 +4023,5 @@ public:
mapOrphanTransactions.clear();
mapOrphanTransactionsByPrev.clear();
}
-} instance_of_cnetprocessingcleanup;
+};
+static CNetProcessingCleanup instance_of_cnetprocessingcleanup;
diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp
index 31a95486d7..41017fe465 100644
--- a/src/ui_interface.cpp
+++ b/src/ui_interface.cpp
@@ -22,7 +22,8 @@ struct UISignals {
boost::signals2::signal<CClientUIInterface::NotifyBlockTipSig> NotifyBlockTip;
boost::signals2::signal<CClientUIInterface::NotifyHeaderTipSig> NotifyHeaderTip;
boost::signals2::signal<CClientUIInterface::BannedListChangedSig> BannedListChanged;
-} g_ui_signals;
+};
+static UISignals g_ui_signals;
#define ADD_SIGNALS_IMPL_WRAPPER(signal_name) \
boost::signals2::connection CClientUIInterface::signal_name##_connect(std::function<signal_name##Sig> fn) \
diff --git a/src/validation.cpp b/src/validation.cpp
index 6fd7964647..31b2eb3973 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -78,7 +78,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIn
return false;
}
-CChainState g_chainstate;
+static CChainState g_chainstate;
CChainState& ChainstateActive() { return g_chainstate; }
@@ -1049,7 +1049,7 @@ bool CChainState::IsInitialBlockDownload() const
return false;
}
-CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
+static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
static void AlertNotify(const std::string& strMessage)
{
@@ -4762,4 +4762,5 @@ public:
delete (*it1).second;
mapBlockIndex.clear();
}
-} instance_of_cmaincleanup;
+};
+static CMainCleanup instance_of_cmaincleanup;