Use static_cast to cast to bool.

GitOrigin-RevId: b62a74880cee8984ddf9607141b350f979000b4b
This commit is contained in:
levlam 2019-06-18 03:21:55 +03:00
parent 0ef8053f46
commit 853c0986d9
3 changed files with 3 additions and 3 deletions

View File

@ -460,7 +460,7 @@ const FullLocalFileLocation &FileView::local_location() const {
}
bool FileView::has_remote_location() const {
return bool(node_->remote_.full);
return static_cast<bool>(node_->remote_.full);
}
bool FileView::has_alive_remote_location() const {
return node_->remote_.is_full_alive;

View File

@ -212,7 +212,7 @@ class ConstFileNodePtr {
}
explicit operator bool() const {
return bool(file_node_ptr_);
return static_cast<bool>(file_node_ptr_);
}
const FullRemoteFileLocation *get_remote() const {
return file_node_ptr_.get_remote();

View File

@ -250,7 +250,7 @@ class CancellablePromise : public PromiseT {
return true;
}
virtual bool is_cancelled() const {
return bool(cancellation_token_);
return static_cast<bool>(cancellation_token_);
}
private: