Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fix warning in `catch_unique_ptr::bool()`

Commit
fbfd13501ca288e5ffeb725328827786abb99d23
Author
Tim Lyon ·
Committer
Martin Hořeňovský
Parents
ccabd4de891e

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_unique_ptr.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/catch2/internal/catch_unique_ptr.hpp b/src/catch2/internal/catch_unique_ptr.hpp
index 49cbc785..8add2a8d 100644
--- a/src/catch2/internal/catch_unique_ptr.hpp
+++ b/src/catch2/internal/catch_unique_ptr.hpp
@@ -92,7 +92,7 @@ namespace Detail {
         }
 
         explicit operator bool() const {
-            return m_ptr;
+            return m_ptr != nullptr;
         }
 
         friend void swap(unique_ptr& lhs, unique_ptr& rhs) {