use normal bool cast

This commit is contained in:
Tom Callaway 2018-03-15 13:48:43 -04:00
parent 8cfa28d974
commit 61203bf461

View File

@ -6,7 +6,7 @@ diff -up chromium-65.0.3325.162/mojo/public/cpp/bindings/associated_interface_pt
bool is_valid() const { return handle_.is_valid(); }
- explicit operator bool() const { return handle_; }
+ explicit operator bool() const { return static_cast<bool> (handle_); }
+ explicit operator bool() const { return (bool) handle_; }
ScopedInterfaceEndpointHandle PassHandle() {
return std::move(handle_);
@ -18,7 +18,7 @@ diff -up chromium-65.0.3325.162/mojo/public/cpp/bindings/associated_interface_re
bool is_pending() const { return handle_.is_valid(); }
- explicit operator bool() const { return handle_; }
+ explicit operator bool() const { return static_cast<bool> (handle_); }
+ explicit operator bool() const { return (bool) handle_; }
ScopedInterfaceEndpointHandle PassHandle() { return std::move(handle_); }
@ -30,7 +30,7 @@ diff -up chromium-65.0.3325.162/mojo/public/cpp/bindings/interface_request.h.boo
bool is_pending() const { return handle_.is_valid(); }
- explicit operator bool() const { return handle_; }
+ explicit operator bool() const { return static_cast<bool> (handle_); }
+ explicit operator bool() const { return (bool) handle_; }
// Removes the message pipe from the request and returns it.
ScopedMessagePipeHandle PassMessagePipe() { return std::move(handle_); }