From afd77f00e20117054d290072aff908c0d402854d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 06:38:18 +0000 Subject: [PATCH 1/2] Initial plan From 9258956801b7ca8260cf1a7631e5dcf91abf58ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 06:43:51 +0000 Subject: [PATCH 2/2] Make smart pointer operator bool() explicit to prevent implicit conversions Agent-Logs-Url: https://github.com/PrettyCADStudio/PrettyMemory/sessions/b8f25225-0ac1-48dc-9ad6-0fe8af5a0687 Co-authored-by: zhuuuoyue <32356359+zhuuuoyue@users.noreply.github.com> --- include/PrettyMemory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/PrettyMemory.h b/include/PrettyMemory.h index ddfe3b3..5d11ce0 100644 --- a/include/PrettyMemory.h +++ b/include/PrettyMemory.h @@ -214,7 +214,7 @@ namespace prtm ConstPointer Data() const { return Get(); } /** @brief Check whether this ShadowPtr points to a live object. */ - operator bool() const { return nullptr != Get(); } + explicit operator bool() const { return nullptr != Get(); } /** @brief Check whether the referenced object has expired. */ bool Expired() const { return nullptr == Get(); } @@ -604,7 +604,7 @@ namespace prtm ConstPointer operator->() const { return Get(); } /** @brief Check whether this OwnerPtr currently owns an object. */ - operator bool() const { return nullptr != Get(); } + explicit operator bool() const { return nullptr != Get(); } /** @brief Check whether this OwnerPtr is null. */ bool IsNull() const { return nullptr == Get(); }