-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use constexpr in some geometry classes
https://bugs.webkit.org/show_bug.cgi?id=273954 rdar://127819143 Reviewed by Wenson Hsieh and Matthieu Dubet. Add constexpr to more constructors and functions on IntPoint/LayoutPoint/LayoutUnit to allow for these types to be used in compile-time constants. * Source/WebCore/platform/LayoutUnit.h: (WebCore::LayoutUnit::LayoutUnit): (WebCore::LayoutUnit::toInt const): (WebCore::LayoutUnit::toFloat const): (WebCore::LayoutUnit::toDouble const): (WebCore::LayoutUnit::toUnsigned const): (WebCore::LayoutUnit::operator int const): (WebCore::LayoutUnit::operator float const): (WebCore::LayoutUnit::operator double const): (WebCore::LayoutUnit::operator bool const): (WebCore::LayoutUnit::rawValue const): * Source/WebCore/platform/graphics/IntPoint.h: (WebCore::IntPoint::IntPoint): (WebCore::IntPoint::zero): (WebCore::IntPoint::isZero const): (WebCore::IntPoint::x const): (WebCore::IntPoint::y const): (WebCore::IntPoint::expandedTo const): (WebCore::IntPoint::shrunkTo const): * Source/WebCore/platform/graphics/LayoutPoint.h: (WebCore::LayoutPoint::LayoutPoint): (WebCore::LayoutPoint::zero): (WebCore::LayoutPoint::isZero const): Canonical link: https://commits.webkit.org/278589@main
- Loading branch information
Showing
3 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters