summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2020-08-06 18:53:12 +0300
committerKonstantin Ritt <ritt.ks@gmail.com>2020-08-12 16:13:15 +0300
commit95946222e6615cdf731f266530d4dc2db0f28a92 (patch)
treeb4de5cac8401a98b40806d86048995f002067bc6 /src
parent1d4457da13f818d08bf26215c2d5a8bc7fd5757b (diff)
QtFontStyle: Add missing const to non-mutable operators
and once I touch these lines anyways, either add noexcept ;) Fixes-up 8bdbb7f2267 Change-Id: Ibfaedcff82c041293220408ab7ae739b3cbd2a4f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qfontdatabase_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase_p.h b/src/gui/text/qfontdatabase_p.h
index fba40e9133..5aff36d5cf 100644
--- a/src/gui/text/qfontdatabase_p.h
+++ b/src/gui/text/qfontdatabase_p.h
@@ -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;