Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ia7be2c466f4d73f5d5ab1271f918f3f89d3498ec
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11440
Tested-by: jenkins <jenkins@lttng.org>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
bt2s::optional<std::uint64_t> count() const noexcept
{
std::uint64_t count;
- const auto avail = bt_message_discarded_events_get_count(this->libObjPtr(), &count);
- if (avail) {
+ if (bt_message_discarded_events_get_count(this->libObjPtr(), &count)) {
return count;
}
bt2s::optional<std::uint64_t> count() const noexcept
{
std::uint64_t count;
- const auto avail = bt_message_discarded_packets_get_count(this->libObjPtr(), &count);
- if (avail) {
+ if (bt_message_discarded_packets_get_count(this->libObjPtr(), &count)) {
return count;
}
bt2s::optional<LogLevel> logLevel() const noexcept
{
bt_event_class_log_level libLogLevel;
- const auto avail = bt_event_class_get_log_level(this->libObjPtr(), &libLogLevel);
- if (avail == BT_PROPERTY_AVAILABILITY_AVAILABLE) {
+ if (bt_event_class_get_log_level(this->libObjPtr(), &libLogLevel)) {
return static_cast<LogLevel>(libLogLevel);
}