cefclient: mac: Fix type conversion error with Xcode

This commit is contained in:
Marshall Greenblatt 2023-07-06 13:19:51 +03:00
parent 7a033d7585
commit a576150ab5
2 changed files with 3 additions and 2 deletions

View File

@ -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<int>(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;

View File

@ -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<int>(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;