From a576150ab570a8b73a3ad00110b54100ab5f729e Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 6 Jul 2023 13:19:51 +0300 Subject: [PATCH] cefclient: mac: Fix type conversion error with Xcode --- tests/cefclient/browser/views_menu_bar.cc | 3 ++- tests/cefclient/browser/views_window.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/cefclient/browser/views_menu_bar.cc b/tests/cefclient/browser/views_menu_bar.cc index 4640c5cd4..6f04714e4 100644 --- a/tests/cefclient/browser/views_menu_bar.cc +++ b/tests/cefclient/browser/views_menu_bar.cc @@ -184,7 +184,8 @@ void ViewsMenuBar::OnMenuButtonPressed( button_bounds.y - button_bounds.height; // Approximation of the menu height. - const int menu_height = menu_model->GetCount() * button_bounds.height; + const int menu_height = + static_cast(menu_model->GetCount()) * button_bounds.height; if (menu_height > available_height) { // The menu will go upwards, so place it above the button. point.y -= button_bounds.height - 8; diff --git a/tests/cefclient/browser/views_window.cc b/tests/cefclient/browser/views_window.cc index 5faa96a1a..76731ddcb 100644 --- a/tests/cefclient/browser/views_window.cc +++ b/tests/cefclient/browser/views_window.cc @@ -570,7 +570,7 @@ void ViewsWindow::OnMenuButtonPressed( // Approximation of the menu height. const int menu_height = - button_menu_model_->GetCount() * button_bounds.height; + static_cast(button_menu_model_->GetCount()) * button_bounds.height; if (menu_height > available_height) { // The menu will go upwards, so place it above the button. point.y -= button_bounds.height - 8;