Commit cf6d6b40 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

Make blink::LayoutUnit::HasFraction constexpr

Other HasFraction methods as in PhysicalUnit are declared already
constexpr and using it. It breaks GCC build.

Bug: 819294.
Change-Id: I0c4bd9bd206d45cf31f7fa815ce8533718a425cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645222Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#666336}
parent c1cf87d1
...@@ -202,7 +202,9 @@ class LayoutUnit { ...@@ -202,7 +202,9 @@ class LayoutUnit {
return value_ > 0 ? LayoutUnit() : *this; return value_ > 0 ? LayoutUnit() : *this;
} }
bool HasFraction() const { return RawValue() % kFixedPointDenominator; } constexpr bool HasFraction() const {
return RawValue() % kFixedPointDenominator;
}
LayoutUnit Fraction() const { LayoutUnit Fraction() const {
// Compute fraction using the mod operator to preserve the sign of the value // Compute fraction using the mod operator to preserve the sign of the value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment