From 9019b83ee4b383e07f178cb6065ce62c98f7b13f Mon Sep 17 00:00:00 2001 From: James McMullan Date: Mon, 11 Nov 2024 21:29:29 -0500 Subject: [PATCH] HPCC-32961 OwnedSpanScope assignment causes early span end - Added OwnedSpanScope assignment operator for ISpan* - Deleted OwnedSpanScope copy constructor and assignment operator Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- system/jlib/jtrace.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/jlib/jtrace.hpp b/system/jlib/jtrace.hpp index 7f1e7d9431b..6f15055c865 100644 --- a/system/jlib/jtrace.hpp +++ b/system/jlib/jtrace.hpp @@ -164,11 +164,17 @@ class jlib_decl OwnedSpanScope public: OwnedSpanScope() = default; OwnedSpanScope(ISpan * _ptr); + OwnedSpanScope(const OwnedSpanScope& rhs) = delete; + OwnedSpanScope(OwnedSpanScope&& rhs) = default; ~OwnedSpanScope(); inline ISpan * operator -> () const { return span; } inline operator ISpan *() const { return span; } + inline OwnedSpanScope& operator=(ISpan * ptr) = delete; + inline OwnedSpanScope& operator=(const OwnedSpanScope& rhs) = delete; + inline OwnedSpanScope& operator=(OwnedSpanScope&& rhs) = default; + void clear(); ISpan * query() const { return span; } void set(ISpan * _span);