mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
avoid temporary in QColor::setAlphaF()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
91be374beb
commit
df12ab858a
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue