diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-05-14 10:15:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-07 15:57:26 +0200 |
commit | b7af99ff2c6f5e253b305cbecc4aec2eb9624f39 (patch) | |
tree | c6f6efd5fd7f85f71b6a9e8873515de175c0ddc5 | |
parent | b65ee9e7dc40f9aa71af5a77b5cefc4e9d882e82 (diff) | |
download | qtwebengine-chromium-b7af99ff2c6f5e253b305cbecc4aec2eb9624f39.tar.gz |
Fix build with GCC 8.1.0
Task-number: QTBUG-68203
Change-Id: I780d884d5e20ef04e902d7b449da4aa3f97d8d0b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
4 files changed, 5 insertions, 3 deletions
diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h index 1f79662bd79..184ba6a9e8b 100644 --- a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h +++ b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h @@ -45,7 +45,7 @@ class AssociatedInterfacePtrInfo { bool is_valid() const { return handle_.is_valid(); } - explicit operator bool() const { return handle_; } + explicit operator bool() const { return !!handle_; } ScopedInterfaceEndpointHandle PassHandle() { return std::move(handle_); diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_request.h b/chromium/mojo/public/cpp/bindings/associated_interface_request.h index 12d2f3ce1df..fcdc2b93210 100644 --- a/chromium/mojo/public/cpp/bindings/associated_interface_request.h +++ b/chromium/mojo/public/cpp/bindings/associated_interface_request.h @@ -50,7 +50,7 @@ class AssociatedInterfaceRequest { // handle. bool is_pending() const { return handle_.is_valid(); } - explicit operator bool() const { return handle_; } + explicit operator bool() const { return !!handle_; } ScopedInterfaceEndpointHandle PassHandle() { return std::move(handle_); } diff --git a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h index 0637d49755b..e279e080571 100644 --- a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h +++ b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h @@ -45,6 +45,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS_BASE) ScopedInterfaceEndpointHandle { bool is_valid() const; + explicit operator bool() const { return is_valid(); } + // Returns true if the interface hasn't associated with a message pipe. bool pending_association() const; diff --git a/chromium/mojo/public/cpp/system/handle.h b/chromium/mojo/public/cpp/system/handle.h index 7c886e8825e..c9f9e961db5 100644 --- a/chromium/mojo/public/cpp/system/handle.h +++ b/chromium/mojo/public/cpp/system/handle.h @@ -121,7 +121,7 @@ class ScopedHandleBase { bool is_valid() const { return handle_.is_valid(); } - explicit operator bool() const { return handle_; } + explicit operator bool() const { return !!handle_; } bool operator==(const ScopedHandleBase& other) const { return handle_.value() == other.get().value(); |