From 444bf9640a91c674a5812704e9e1159f0efbda1d Mon Sep 17 00:00:00 2001 From: Treb Connell Date: Mon, 28 Sep 2015 18:49:53 -0700 Subject: [PATCH] Fix issue #49 --- include/gsl.h | 4 ++-- tests/maybenull_tests.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/gsl.h b/include/gsl.h index 1405993..a73db6b 100644 --- a/include/gsl.h +++ b/include/gsl.h @@ -223,12 +223,12 @@ public: template ::value>> - maybe_null_dbg(const maybe_null_dbg &other) : ptr_(other.get()), tested_(false) {} + maybe_null_dbg(const maybe_null_dbg &other) : ptr_(other.ptr_), tested_(false) {} template ::value>> maybe_null_dbg& operator=(const maybe_null_dbg &other) { - ptr_ = other.get(); + ptr_ = other.ptr_; tested_ = false; return *this; } diff --git a/tests/maybenull_tests.cpp b/tests/maybenull_tests.cpp index 944307e..661b26a 100644 --- a/tests/maybenull_tests.cpp +++ b/tests/maybenull_tests.cpp @@ -289,9 +289,7 @@ SUITE(MaybeNullTests) mnBase_dbg2 = nnBase; // maybe_null_dbg = not_null maybe_null_dbg mnDerived_dbg(&derived); - CHECK(mnDerived_dbg.present()); mnBase_dbg2 = mnDerived_dbg; // maybe_null_dbg = maybe_null_dbg - mnBase_dbg1 = &derived; // maybe_null_dbg = U; mnBase_dbg1 = nnDerived; // maybe_null_dbg = not_null