Widen int to qint64 before multiplication, not after.

Noted by Coverity, CID 1334968.
This commit is contained in:
Michael Pyne 2015-12-27 21:52:47 -05:00
parent 02e9001f39
commit 4957c18a44

View file

@ -79,7 +79,7 @@ void CompositorSelectionOwner::looseOwnership()
KWIN_SINGLETON_FACTORY_VARIABLE(Compositor, s_compositor)
static inline qint64 milliToNano(int milli) { return milli * 1000 * 1000; }
static inline qint64 milliToNano(int milli) { return qint64(milli) * 1000 * 1000; }
static inline qint64 nanoToMilli(int nano) { return nano / (1000*1000); }
Compositor::Compositor(QObject* workspace)