aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/serialize.h11
-rw-r--r--src/util.h8
2 files changed, 7 insertions, 12 deletions
diff --git a/src/serialize.h b/src/serialize.h
index c55775242b..0a31ff557d 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -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);
+}
/////////////////////////////////////////////////////////////////
//
diff --git a/src/util.h b/src/util.h
index 1e4ceb2468..3d7ef108b4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -67,14 +67,6 @@ typedef unsigned long long uint64;
// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
#define PAIRTYPE(t1, t2) pair<t1, t2>
-// 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 (T&)val;
-}
-
// Align by increasing pointer, must have extra space at end of buffer
template <size_t nBytes, typename T>
T* alignup(T* p)