OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91be374
)
avoid temporary in QColor::setAlphaF()
author
Ivailo Monev
<xakepa10@gmail.com>
Wed, 19 Aug 2020 13:36:46 +0000
(16:36 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Wed, 19 Aug 2020 13:36:46 +0000
(16:36 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/painting/qcolor.cpp
patch
|
blob
|
history
diff --git
a/src/gui/painting/qcolor.cpp
b/src/gui/painting/qcolor.cpp
index
4815c73
..
bcc12cb
100644
(file)
--- a/
src/gui/painting/qcolor.cpp
+++ b/
src/gui/painting/qcolor.cpp
@@
-1246,8
+1246,7
@@
qreal QColor::alphaF() const
void QColor::setAlphaF(qreal alpha)
{
QCOLOR_REAL_RANGE_CHECK("QColor::setAlphaF", alpha);
- qreal tmp = alpha * USHRT_MAX;
- ct.argb.alpha = qRound(tmp);
+ ct.argb.alpha = qRound(alpha * USHRT_MAX);
}