mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 00:40:34 +02:00
Move func 'REF' from util.h to serialize.h
util.h doesn't use REF, serialize.h does, creating a dependency of serialize.h on util.h, but util.h already depends on serialize.h. To resolve this circular dependency the function 'REF' has now been moved closer to one of its two points of use. Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
@ -63,10 +63,13 @@ static const int VERSION = 32500;
|
||||
static const char* pszSubVer = "";
|
||||
static const bool VERSION_IS_BETA = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Used to bypass the rule against non-const reference to temporary
|
||||
// where it makes sense with wrappers such as CFlatData or CTxDB
|
||||
template<typename T>
|
||||
inline T& REF(const T& val)
|
||||
{
|
||||
return const_cast<T&>(val);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
Reference in New Issue
Block a user