fix: modernize-use-nodiscard clang-tidy warnings (#44832)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-11-25 11:47:00 -06:00 committed by GitHub
parent fe3467e187
commit 51e31de79e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 14 additions and 14 deletions

View file

@ -86,7 +86,7 @@ class ElectronPermissionManager::PendingRequest {
return content::RenderFrameHost::FromID(render_frame_host_id_);
}
bool IsComplete() const { return remaining_results_ == 0; }
[[nodiscard]] bool IsComplete() const { return remaining_results_ == 0; }
void RunCallback() {
if (!callback_.is_null()) {

View file

@ -135,15 +135,15 @@ class ElectronDelegatedFrameHostClient
const ElectronDelegatedFrameHostClient&) = delete;
// content::DelegatedFrameHostClient
ui::Layer* DelegatedFrameHostGetLayer() const override {
[[nodiscard]] ui::Layer* DelegatedFrameHostGetLayer() const override {
return view_->root_layer();
}
bool DelegatedFrameHostIsVisible() const override {
[[nodiscard]] bool DelegatedFrameHostIsVisible() const override {
return view_->IsShowing();
}
SkColor DelegatedFrameHostGetGutterColor() const override {
[[nodiscard]] SkColor DelegatedFrameHostGetGutterColor() const override {
if (view_->render_widget_host()->delegate() &&
view_->render_widget_host()->delegate()->IsFullscreen()) {
return SK_ColorWHITE;
@ -156,7 +156,7 @@ class ElectronDelegatedFrameHostClient
view_->render_widget_host()->DidProcessFrame(frame_token, activation_time);
}
float GetDeviceScaleFactor() const override {
[[nodiscard]] float GetDeviceScaleFactor() const override {
return view_->GetDeviceScaleFactor();
}