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

GCC: SizeBounds setters cannot be constexpr

As base::Optional move assignment operator is not constexpr, the
setters using it cannot be constexpr either.

Bug: 819294
Change-Id: I0c6e0325728f05ff9d6d892a3508ebb1b21a85c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041611Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#742834}
parent 15cece5e
...@@ -45,14 +45,10 @@ class VIEWS_EXPORT SizeBounds { ...@@ -45,14 +45,10 @@ class VIEWS_EXPORT SizeBounds {
~SizeBounds() = default; ~SizeBounds() = default;
constexpr const base::Optional<int>& width() const { return width_; } constexpr const base::Optional<int>& width() const { return width_; }
constexpr void set_width(base::Optional<int> width) { void set_width(base::Optional<int> width) { width_ = std::move(width); }
width_ = std::move(width);
}
constexpr const base::Optional<int>& height() const { return height_; } constexpr const base::Optional<int>& height() const { return height_; }
constexpr void set_height(base::Optional<int> height) { void set_height(base::Optional<int> height) { height_ = std::move(height); }
height_ = std::move(height);
}
constexpr bool is_fully_bounded() const { return width_ && height_; } constexpr bool is_fully_bounded() const { return width_ && height_; }
......
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