From 47a001722d7ada681e333e991373e19d159c380b Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 29 May 2014 22:54:34 +0200 Subject: BitField: Add an explicit evaluation method. Sometimes it can be beneficial to use this in places where an explicit cast needs to happen otherwise. By using the evaluation method, it's not necessary anymore to explicitly write the underlying type in this case. --- src/common/bit_field.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/bit_field.h') diff --git a/src/common/bit_field.h b/src/common/bit_field.h index dfd00d19..a39bb988 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h @@ -131,6 +131,11 @@ public: } __forceinline operator T() const + { + return Value(); + } + + __forceinline T Value() const { if (std::numeric_limits::is_signed) { -- cgit v1.2.3