QtFontStyle: Add missing const to non-mutable operators
and once I touch these lines anyways, either add noexcept ;)
Fixes-up 8bdbb7f226
Change-Id: Ibfaedcff82c041293220408ab7ae739b3cbd2a4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
parent
1d4457da13
commit
95946222e6
|
|
@ -116,18 +116,18 @@ struct Q_GUI_EXPORT QtFontStyle
|
|||
signed int weight : 8;
|
||||
signed int stretch : 12;
|
||||
|
||||
bool operator==(const Key &other)
|
||||
bool operator==(const Key &other) const noexcept
|
||||
{
|
||||
return (style == other.style && weight == other.weight &&
|
||||
(stretch == 0 || other.stretch == 0 || stretch == other.stretch));
|
||||
}
|
||||
|
||||
bool operator!=(const Key &other)
|
||||
bool operator!=(const Key &other) const noexcept
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool operator<(const Key &o)
|
||||
bool operator<(const Key &o) const noexcept
|
||||
{
|
||||
int x = (style << 12) + (weight << 14) + stretch;
|
||||
int y = (o.style << 12) + (o.weight << 14) + o.stretch;
|
||||
|
|
|
|||
Loading…
Reference in New Issue