Skip to content

Commit

Permalink
Use explicit for CUnitPtr(CUnit *).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Apr 2, 2024
1 parent bb4604f commit b1680e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/include/unitptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }

Expand Down

0 comments on commit b1680e0

Please sign in to comment.