diff --git a/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h b/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h index 6b0270b127..d3719e575e 100644 --- a/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h +++ b/logging/rtc_event_log/events/rtc_event_field_encoding_parser.h @@ -36,7 +36,9 @@ class RtcEventLogParseStatus { } bool ok() const { return error_.empty(); } - ABSL_DEPRECATED("Use ok() instead") operator bool() const { return ok(); } + ABSL_DEPRECATED("Use ok() instead") explicit operator bool() const { + return ok(); + } std::string message() const { return error_; } diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc index cb75456fde..df753ed0c9 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.cc +++ b/modules/congestion_controller/goog_cc/probe_controller.cc @@ -225,7 +225,7 @@ std::vector ProbeController::OnMaxTotalAllocatedBitrate( probes.push_back(second_probe_rate.bps()); } return InitiateProbing(at_time_ms, probes, - config_.allocation_allow_further_probing); + config_.allocation_allow_further_probing.Get()); } max_total_allocated_bitrate_ = max_total_allocated_bitrate; return std::vector(); diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc index 8fae69ed9c..1afb0ee491 100644 --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc @@ -149,7 +149,7 @@ class ScopedBuf { } } - operator bool() { return map_ != MAP_FAILED; } + explicit operator bool() { return map_ != MAP_FAILED; } void initialize(uint8_t* map, int map_size, int fd) { map_ = map; diff --git a/rtc_base/experiments/field_trial_parser.h b/rtc_base/experiments/field_trial_parser.h index c67ef542d3..bd11eea20a 100644 --- a/rtc_base/experiments/field_trial_parser.h +++ b/rtc_base/experiments/field_trial_parser.h @@ -220,7 +220,7 @@ class FieldTrialFlag : public FieldTrialParameterInterface { explicit FieldTrialFlag(std::string key); FieldTrialFlag(std::string key, bool default_value); bool Get() const; - operator bool() const; + explicit operator bool() const; protected: bool Parse(absl::optional str_value) override; diff --git a/sdk/objc/unittests/scoped_cftyperef_tests.mm b/sdk/objc/unittests/scoped_cftyperef_tests.mm index 2aa85182a6..26a6d0b3b9 100644 --- a/sdk/objc/unittests/scoped_cftyperef_tests.mm +++ b/sdk/objc/unittests/scoped_cftyperef_tests.mm @@ -16,7 +16,7 @@ namespace { struct TestType { TestType() : has_value(true) {} TestType(bool b) : has_value(b) {} - operator bool() { return has_value; } + explicit operator bool() { return has_value; } bool has_value; int retain_count = 0; };