@@ -353,6 +353,8 @@ class SpinLock {
353
353
struct finally {
354
354
std::function<void ()> MFunc;
355
355
356
+ finally (const finally &) = delete ;
357
+ finally &operator =(const finally &) = delete ;
356
358
~finally () {
357
359
if (xptiTraceEnabled ())
358
360
MFunc ();
@@ -663,6 +665,11 @@ class stash_tuple {
663
665
(xptiStashTuple (key, value) == xpti::result_t ::XPTI_RESULT_SUCCESS);
664
666
}
665
667
668
+ // Copy and copy assignment are deleted since we dont want to stash the same
669
+ // key-value pair multiple times
670
+ stash_tuple (const stash_tuple &) = delete ;
671
+ stash_tuple &operator =(const stash_tuple &) = delete ;
672
+
666
673
// / @brief Destroys the stash_tuple object and unstashes the key-value pair if
667
674
// / it was stashed successfully earlier.
668
675
// /
@@ -734,6 +741,8 @@ class uid_object_t {
734
741
MUId.instance = 0 ;
735
742
};
736
743
744
+ ~uid_object_t () = default ;
745
+
737
746
// / @brief Copy constructor for creating a uid_object_t object as a copy of
738
747
// / another.
739
748
// /
@@ -1613,6 +1622,10 @@ class tracepoint_t {
1613
1622
}
1614
1623
}
1615
1624
}
1625
+
1626
+ tracepoint_t (const tracepoint_t &) = delete ;
1627
+ tracepoint_t &operator =(const tracepoint_t &) = delete ;
1628
+
1616
1629
~tracepoint_t () {
1617
1630
// If tracing is not enabled, don't do anything
1618
1631
if (!xptiTraceEnabled ())
@@ -1779,4 +1792,4 @@ class tracepoint_t {
1779
1792
// /
1780
1793
// / @param self A pointer to the current function.
1781
1794
// /
1782
- #define XPTI_USE_TRACE_SCOPE () xpti::framework::tracepoint_scope_t TP (true );
1795
+ #define XPTI_USE_TRACE_SCOPE () xpti::framework::tracepoint_scope_t TP (true );
0 commit comments