Move func 'REF' from util.h to serialize.h
[novacoin.git] / src / serialize.h
index c557752..0a31ff5 100644 (file)
@@ -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);
+}
 
 /////////////////////////////////////////////////////////////////
 //