From 853c0986d9351374c156a97626c1c7c50e62a1fd Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 18 Jun 2019 03:21:55 +0300 Subject: [PATCH] Use static_cast to cast to bool. GitOrigin-RevId: b62a74880cee8984ddf9607141b350f979000b4b --- td/telegram/files/FileManager.cpp | 2 +- td/telegram/files/FileManager.h | 2 +- tdactor/td/actor/PromiseFuture.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 7d525c54..e1b7171f 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -460,7 +460,7 @@ const FullLocalFileLocation &FileView::local_location() const { } bool FileView::has_remote_location() const { - return bool(node_->remote_.full); + return static_cast(node_->remote_.full); } bool FileView::has_alive_remote_location() const { return node_->remote_.is_full_alive; diff --git a/td/telegram/files/FileManager.h b/td/telegram/files/FileManager.h index 34b7ab1f..f1e2d034 100644 --- a/td/telegram/files/FileManager.h +++ b/td/telegram/files/FileManager.h @@ -212,7 +212,7 @@ class ConstFileNodePtr { } explicit operator bool() const { - return bool(file_node_ptr_); + return static_cast(file_node_ptr_); } const FullRemoteFileLocation *get_remote() const { return file_node_ptr_.get_remote(); diff --git a/tdactor/td/actor/PromiseFuture.h b/tdactor/td/actor/PromiseFuture.h index fcf86db0..850e8814 100644 --- a/tdactor/td/actor/PromiseFuture.h +++ b/tdactor/td/actor/PromiseFuture.h @@ -250,7 +250,7 @@ class CancellablePromise : public PromiseT { return true; } virtual bool is_cancelled() const { - return bool(cancellation_token_); + return static_cast(cancellation_token_); } private: