diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-09-01 11:52:07 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-09-01 11:52:07 -0400 |
commit | dd7868364d9a14349ff82f74fc451db5e6b6b7b9 (patch) | |
tree | ed4142635ca823364fd272a010200380b8776412 /src/serialize.h | |
parent | f662cefd8552f07548dcca9dcf84a952650fab6f (diff) | |
parent | e4dde849ae5544383703ef2d73592677e6c528ad (diff) |
Merge branch 'code-cleanup' of git://github.com/muggenhor/bitcoin
Diffstat (limited to 'src/serialize.h')
-rw-r--r-- | src/serialize.h | 11 |
1 files changed, 7 insertions, 4 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); +} ///////////////////////////////////////////////////////////////// // |