commit | b2542bdc1868d86fb2b405bf160e31c55e61fdaf | [log] [tgz] |
---|---|---|
author | Jose Dapena Paz <jose.dapena@lge.com> | Fri Jul 27 15:41:08 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 27 15:41:08 2018 |
tree | fd6eec875d25567e8ae5375a7d8e6f0e26a87637 | |
parent | c36aa32695fe893d721015ee2566b79ba65d3d1d [diff] |
GCC: fix regressions after declaring constexpr many geometry types methods. Commit 19105bf introduced using constexpr for lots of methods. It introduced two kinds of regressions building with GCC: - Some depended on FloatSize::IsZero, which is not only non constexpr, but it cannot be constexpr either, as it depends on fabs, that is not constexpr. - Some depended on methods that were not constexpr (but we could fix them to be, as FloatQuat::P1() or FloatSize::SetWidth(). Those do not break in clang as it is a less picky in the scenario of defining a constexpr method that depends on non-constexpr methods. This patch fixes usage of constexpr in both cases adding constexpr implementations when needed. In particular it replaces fabs calls that are not constexpr at least in libc++ with a constexpr replacement, fixing GCC build and adding some extra constexpr that were missing. Bug: 819294 Change-Id: Ia1143ad4be1067bb8a918f0224b657523599ea97 Reviewed-on: https://chromium-review.googlesource.com/1150529 Commit-Queue: José Dapena Paz <jose.dapena@lge.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Cr-Commit-Position: refs/heads/master@{#578654}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .