aboutsummaryrefslogtreecommitdiff
path: root/pw_trace
diff options
context:
space:
mode:
authorminxm <minxm@google.com>2022-11-30 17:58:19 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-30 17:58:19 +0000
commit48f142c7250fcd242c07eeb1901422fd8ba7b989 (patch)
treef36d36ad12f3d61ed6108da62d2493e3231fbb86 /pw_trace
parentc0c54cd4101aaf318914409cb0cc9fd7da0ffcfe (diff)
downloadpigweed-48f142c7250fcd242c07eeb1901422fd8ba7b989.tar.gz
pw_trace: Fix special-member-functions warning
Fix the cppcoreguidelines-special-member-functions lint warning for PW_TRACE_FUNCTION and PW_TRACE_SCOPE Change-Id: I6c3ae4e138bccbdad78270052726f909538aa7fc Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/120810 Reviewed-by: Armando Montanez <amontanez@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Min Xu <minxm@google.com>
Diffstat (limited to 'pw_trace')
-rw-r--r--pw_trace/public/pw_trace/internal/trace_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pw_trace/public/pw_trace/internal/trace_internal.h b/pw_trace/public/pw_trace/internal/trace_internal.h
index f6262eec4..fc106b80c 100644
--- a/pw_trace/public/pw_trace/internal/trace_internal.h
+++ b/pw_trace/public/pw_trace/internal/trace_internal.h
@@ -238,6 +238,10 @@ static inline void _pw_trace_disabled(int x, ...) { (void)x; }
object_name, flag, event_type_start, event_type_end, label, group) \
class object_name { \
public: \
+ object_name(const object_name&) = delete; \
+ object_name(object_name&&) = delete; \
+ object_name& operator=(const object_name&) = delete; \
+ object_name& operator=(object_name&&) = delete; \
object_name(uint32_t trace_id = PW_TRACE_TRACE_ID_DEFAULT) \
: trace_id_(trace_id) { \
_PW_TRACE_IF_ENABLED(event_type_start, flag, label, group, trace_id_); \