From b1680e0fa67d7882c758ba0f851a861908f367df Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Tue, 2 Apr 2024 23:01:20 +0200 Subject: [PATCH] Use `explicit` for `CUnitPtr(CUnit *)`. --- src/include/unitptr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/unitptr.h b/src/include/unitptr.h index e3a31746cd..87323c1144 100644 --- a/src/include/unitptr.h +++ b/src/include/unitptr.h @@ -42,7 +42,8 @@ class CUnitPtr { public: CUnitPtr() : unit(nullptr) {} - CUnitPtr(CUnit *u); + CUnitPtr(std::nullptr_t) : unit(nullptr) {} + explicit CUnitPtr(CUnit *u); CUnitPtr(const CUnitPtr &u); ~CUnitPtr() { Reset(); }