merge bitcoin#16092: Don't use global (external) symbols for symbols that are used in only one translation unit

This commit is contained in:
Kittywhiskers Van Gogh 2019-05-26 11:01:58 +02:00
parent 1bb1cea5c9
commit 900c0100eb
4 changed files with 10 additions and 7 deletions

View File

@ -3111,8 +3111,8 @@ public:
WSACleanup();
#endif
}
}
instance_of_cnetcleanup;
};
static CNetCleanup instance_of_cnetcleanup;
void CExplicitNetCleanup::callCleanup()
{

View File

@ -4863,4 +4863,5 @@ public:
mapOrphanTransactionsByPrev.clear();
nMapOrphanTransactionsSize = 0;
}
} instance_of_cnetprocessingcleanup;
};
static CNetProcessingCleanup instance_of_cnetprocessingcleanup;

View File

@ -25,7 +25,8 @@ struct UISignals {
boost::signals2::signal<CClientUIInterface::NotifyMasternodeListChangedSig> NotifyMasternodeListChanged;
boost::signals2::signal<CClientUIInterface::NotifyAdditionalDataSyncProgressChangedSig> NotifyAdditionalDataSyncProgressChanged;
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) \

View File

@ -101,7 +101,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex* pa, const CBlockIn
return false;
}
CChainState g_chainstate;
static CChainState g_chainstate;
CChainState& ChainstateActive() { return g_chainstate; }
CChain& ChainActive() { return g_chainstate.m_chain; }
@ -1133,7 +1133,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)
{
@ -5183,4 +5183,5 @@ public:
delete (*it1).second;
mapBlockIndex.clear();
}
} instance_of_cmaincleanup;
};
static CMainCleanup instance_of_cmaincleanup;