diff options
Diffstat (limited to 'src/common/swap.h')
| -rw-r--r-- | src/common/swap.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
| 148 | typedef swap_struct_t<T, F> swapped_t; | 148 | typedef swap_struct_t<T, F> swapped_t; |
| 149 | 149 | ||
| 150 | protected: | 150 | protected: |
| 151 | T value; | 151 | T value = T(); |
| 152 | 152 | ||
| 153 | static T swap(T v) { | 153 | static T swap(T v) { |
| 154 | return F::swap(v); | 154 | return F::swap(v); |
| @@ -158,7 +158,7 @@ public: | |||
| 158 | return swap(value); | 158 | return swap(value); |
| 159 | 159 | ||
| 160 | } | 160 | } |
| 161 | swap_struct_t() : value((T)0) {} | 161 | swap_struct_t() = default; |
| 162 | swap_struct_t(const T &v): value(swap(v)) {} | 162 | swap_struct_t(const T &v): value(swap(v)) {} |
| 163 | 163 | ||
| 164 | template <typename S> | 164 | template <typename S> |