From d480e9d0ddeb6948c7681789a8a3e3b0ac044b0c Mon Sep 17 00:00:00 2001 From: guzhihao4 Date: Tue, 28 Mar 2023 10:53:32 +0800 Subject: [PATCH] Fix compile in llvm15 Pass pointer to deleter in shared_ptr Issue: #I6ID6E Signed-off-by: guzhihao4 Change-Id: Id6878d917b4619a981cf6f36180cbbf459c8561b --- services/common/platform/event/source/event.cpp | 2 +- services/common/platform/semaphore/source/semaphore.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/common/platform/event/source/event.cpp b/services/common/platform/event/source/event.cpp index 15bd597..dd9a0b9 100755 --- a/services/common/platform/event/source/event.cpp +++ b/services/common/platform/event/source/event.cpp @@ -83,7 +83,7 @@ DEFINE_IMPL_CLASS_CAST(EventCast, IEvent, Event); class EventDeleter { public: - void operator ()(IEvent *&p) const + void operator ()(IEvent *p) const { EventCast::Destroy(p); } diff --git a/services/common/platform/semaphore/source/semaphore.cpp b/services/common/platform/semaphore/source/semaphore.cpp index 7eb124a..4d8f7a5 100755 --- a/services/common/platform/semaphore/source/semaphore.cpp +++ b/services/common/platform/semaphore/source/semaphore.cpp @@ -68,7 +68,7 @@ DEFINE_IMPL_CLASS_CAST(SemaphoreCast, ISemaphore, Semaphore); class SemaphoreDeleter { public: - void operator ()(ISemaphore *&p) const + void operator ()(ISemaphore *p) const { SemaphoreCast::Destroy(p); }