From c677c492013b15993843ac26e5210a544f64ba90 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 1 Nov 2023 16:53:54 -0400 Subject: [PATCH] cpp-common/bt2: add missing `noexcept` to static methods Signed-off-by: Philippe Proulx Change-Id: I3737dc68a270446e9eafee23afb24fc816ca2bbc Reviewed-on: https://review.lttng.org/c/babeltrace/+/11193 Reviewed-by: Simon Marchi --- src/cpp-common/bt2/clock-class.hpp | 4 ++-- src/cpp-common/bt2/field-class.hpp | 4 ++-- src/cpp-common/bt2/field-path.hpp | 4 ++-- src/cpp-common/bt2/integer-range-set.hpp | 8 ++++---- src/cpp-common/bt2/message.hpp | 4 ++-- src/cpp-common/bt2/trace-ir.hpp | 24 ++++++++++++------------ src/cpp-common/bt2/value.hpp | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/cpp-common/bt2/clock-class.hpp b/src/cpp-common/bt2/clock-class.hpp index 70eb2f1e..5e0e949d 100644 --- a/src/cpp-common/bt2/clock-class.hpp +++ b/src/cpp-common/bt2/clock-class.hpp @@ -28,12 +28,12 @@ namespace internal { struct ClockClassRefFuncs final { - static void get(const bt_clock_class * const libObjPtr) + static void get(const bt_clock_class * const libObjPtr) noexcept { bt_clock_class_get_ref(libObjPtr); } - static void put(const bt_clock_class * const libObjPtr) + static void put(const bt_clock_class * const libObjPtr) noexcept { bt_clock_class_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index 0999b135..ec5df3c5 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -30,12 +30,12 @@ namespace internal { struct FieldClassRefFuncs final { - static void get(const bt_field_class * const libObjPtr) + static void get(const bt_field_class * const libObjPtr) noexcept { bt_field_class_get_ref(libObjPtr); } - static void put(const bt_field_class * const libObjPtr) + static void put(const bt_field_class * const libObjPtr) noexcept { bt_field_class_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/field-path.hpp b/src/cpp-common/bt2/field-path.hpp index ef5ff090..eea27e12 100644 --- a/src/cpp-common/bt2/field-path.hpp +++ b/src/cpp-common/bt2/field-path.hpp @@ -111,12 +111,12 @@ namespace internal { struct FieldPathRefFuncs final { - static void get(const bt_field_path * const libObjPtr) + static void get(const bt_field_path * const libObjPtr) noexcept { bt_field_path_get_ref(libObjPtr); } - static void put(const bt_field_path * const libObjPtr) + static void put(const bt_field_path * const libObjPtr) noexcept { bt_field_path_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/integer-range-set.hpp b/src/cpp-common/bt2/integer-range-set.hpp index d58b93cb..f542c6a5 100644 --- a/src/cpp-common/bt2/integer-range-set.hpp +++ b/src/cpp-common/bt2/integer-range-set.hpp @@ -28,12 +28,12 @@ struct IntegerRangeSetRefFuncs; template <> struct IntegerRangeSetRefFuncs final { - static void get(const bt_integer_range_set_unsigned * const libObjPtr) + static void get(const bt_integer_range_set_unsigned * const libObjPtr) noexcept { bt_integer_range_set_unsigned_get_ref(libObjPtr); } - static void put(const bt_integer_range_set_unsigned * const libObjPtr) + static void put(const bt_integer_range_set_unsigned * const libObjPtr) noexcept { bt_integer_range_set_unsigned_put_ref(libObjPtr); } @@ -42,12 +42,12 @@ struct IntegerRangeSetRefFuncs final template <> struct IntegerRangeSetRefFuncs final { - static void get(const bt_integer_range_set_signed * const libObjPtr) + static void get(const bt_integer_range_set_signed * const libObjPtr) noexcept { bt_integer_range_set_signed_get_ref(libObjPtr); } - static void put(const bt_integer_range_set_signed * const libObjPtr) + static void put(const bt_integer_range_set_signed * const libObjPtr) noexcept { bt_integer_range_set_signed_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/message.hpp b/src/cpp-common/bt2/message.hpp index 1b49bed5..b74be2c5 100644 --- a/src/cpp-common/bt2/message.hpp +++ b/src/cpp-common/bt2/message.hpp @@ -26,12 +26,12 @@ namespace internal { struct MessageRefFuncs final { - static void get(const bt_message * const libObjPtr) + static void get(const bt_message * const libObjPtr) noexcept { bt_message_get_ref(libObjPtr); } - static void put(const bt_message * const libObjPtr) + static void put(const bt_message * const libObjPtr) noexcept { bt_message_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/trace-ir.hpp b/src/cpp-common/bt2/trace-ir.hpp index 790735aa..7a87c1cf 100644 --- a/src/cpp-common/bt2/trace-ir.hpp +++ b/src/cpp-common/bt2/trace-ir.hpp @@ -261,12 +261,12 @@ struct TypeDescr : public EventTypeDescr struct PacketRefFuncs final { - static void get(const bt_packet * const libObjPtr) + static void get(const bt_packet * const libObjPtr) noexcept { bt_packet_get_ref(libObjPtr); } - static void put(const bt_packet * const libObjPtr) + static void put(const bt_packet * const libObjPtr) noexcept { bt_packet_put_ref(libObjPtr); } @@ -425,12 +425,12 @@ namespace internal { struct StreamRefFuncs final { - static void get(const bt_stream * const libObjPtr) + static void get(const bt_stream * const libObjPtr) noexcept { bt_stream_get_ref(libObjPtr); } - static void put(const bt_stream * const libObjPtr) + static void put(const bt_stream * const libObjPtr) noexcept { bt_stream_put_ref(libObjPtr); } @@ -643,12 +643,12 @@ namespace internal { struct TraceRefFuncs final { - static void get(const bt_trace * const libObjPtr) + static void get(const bt_trace * const libObjPtr) noexcept { bt_trace_get_ref(libObjPtr); } - static void put(const bt_trace * const libObjPtr) + static void put(const bt_trace * const libObjPtr) noexcept { bt_trace_put_ref(libObjPtr); } @@ -980,12 +980,12 @@ namespace internal { struct EventClassRefFuncs final { - static void get(const bt_event_class * const libObjPtr) + static void get(const bt_event_class * const libObjPtr) noexcept { bt_event_class_get_ref(libObjPtr); } - static void put(const bt_event_class * const libObjPtr) + static void put(const bt_event_class * const libObjPtr) noexcept { bt_event_class_put_ref(libObjPtr); } @@ -1320,12 +1320,12 @@ namespace internal { struct StreamClassRefFuncs final { - static void get(const bt_stream_class * const libObjPtr) + static void get(const bt_stream_class * const libObjPtr) noexcept { bt_stream_class_get_ref(libObjPtr); } - static void put(const bt_stream_class * const libObjPtr) + static void put(const bt_stream_class * const libObjPtr) noexcept { bt_stream_class_put_ref(libObjPtr); } @@ -1855,12 +1855,12 @@ namespace internal { struct TraceClassRefFuncs final { - static void get(const bt_trace_class * const libObjPtr) + static void get(const bt_trace_class * const libObjPtr) noexcept { bt_trace_class_get_ref(libObjPtr); } - static void put(const bt_trace_class * const libObjPtr) + static void put(const bt_trace_class * const libObjPtr) noexcept { bt_trace_class_put_ref(libObjPtr); } diff --git a/src/cpp-common/bt2/value.hpp b/src/cpp-common/bt2/value.hpp index 1aa41318..e83b8aa5 100644 --- a/src/cpp-common/bt2/value.hpp +++ b/src/cpp-common/bt2/value.hpp @@ -29,12 +29,12 @@ namespace internal { struct ValueRefFuncs final { - static void get(const bt_value * const libObjPtr) + static void get(const bt_value * const libObjPtr) noexcept { bt_value_get_ref(libObjPtr); } - static void put(const bt_value * const libObjPtr) + static void put(const bt_value * const libObjPtr) noexcept { bt_value_put_ref(libObjPtr); } -- 2.34.1