FlexLayout: Use std::ceil() rather than std::ceilf()
This fixes the build with libstdc++ after commit 3a6cdd45 ('Improvements in FlexLayout "stretch" cross-axis alignment handling'): ../../ui/views/layout/flex_layout_types_internal.cc: In member function ‘void views::internal::Span::Center(const views::internal::Span&, const views::internal::Inset1D&)’: ../../ui/views/layout/flex_layout_types_internal.cc:57:20: error: ‘ceilf’ is not a member of ‘std’ set_start(std::ceilf(remaining * 0.5f)); ^~~~~ ../../ui/views/layout/flex_layout_types_internal.cc:57:20: note: suggested alternative: ‘ceil’ set_start(std::ceilf(remaining * 0.5f)); ^~~~~ ceil ceilf() is not officially part of the C++14 standard even though libc++ exposes it. In this case, we're multiplying an int and a float, which means we'll call ceil(float) anyway. Bug: 819294 Change-Id: I24f16a5cd0462baef0eea07791758a3712ff2922 Reviewed-on: https://chromium-review.googlesource.com/c/1472673 Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by:Dana Fried <dfried@chromium.org> Cr-Commit-Position: refs/heads/master@{#632320}
Showing
Please register or sign in to comment