Skip to content

Commit

Permalink
HPCC-32961 OwnedSpanScope assignment causes early span end
Browse files Browse the repository at this point in the history
- Added OwnedSpanScope assignment operator for ISpan*
- Deleted OwnedSpanScope copy constructor and assignment operator

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu committed Nov 12, 2024
1 parent 7067a3c commit 9019b83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions system/jlib/jtrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9019b83

Please sign in to comment.