From bc886a7a03d2170223dff397dc2005525bf83255 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 11 Sep 2015 08:54:33 -0400 Subject: common: Get rid of a cast in swap.h --- src/common/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/swap.h b/src/common/swap.h index b92e5bfa4..a7c37bc44 100644 --- a/src/common/swap.h +++ b/src/common/swap.h @@ -148,7 +148,7 @@ struct swap_struct_t { typedef swap_struct_t swapped_t; protected: - T value; + T value = T(); static T swap(T v) { return F::swap(v); @@ -158,7 +158,7 @@ public: return swap(value); } - swap_struct_t() : value((T)0) {} + swap_struct_t() = default; swap_struct_t(const T &v): value(swap(v)) {} template -- cgit v1.2.3