X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fserialize.h;h=320ce9d2ae01be2c2144f34140327f5548d9e271;hb=aec5c5fe26293452d3fe7acf1e4c20830613812c;hp=c183d4b38fbdfa3d212856a521937f54f86dbfae;hpb=b2120e223a9a2282b26080cb126db9aad95b1282;p=novacoin.git diff --git a/src/serialize.h b/src/serialize.h index c183d4b..320ce9d 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -35,6 +35,7 @@ typedef unsigned long long uint64; // Note that VirtualLock does not provide this as a guarantee on Windows, // but, in practice, memory that has been VirtualLock'd almost never gets written to // the pagefile except in rare circumstances where memory is extremely low. +#include #define mlock(p, n) VirtualLock((p), (n)); #define munlock(p, n) VirtualUnlock((p), (n)); #else @@ -58,14 +59,17 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 32500; +static const int VERSION = 40100; 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 +inline T& REF(const T& val) +{ + return const_cast(val); +} ///////////////////////////////////////////////////////////////// //