1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: Use qFuzzyCompare to compare float values

Thanks @BiTOk for this tip
This commit is contained in:
Diadlo 2018-01-22 17:11:17 +03:00
parent 3b52402fa2
commit 7d5a59cf41
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -150,7 +150,7 @@ void VideoSurface::onNewFrameAvailable(const std::shared_ptr<VideoFrame>& newFra
float newRatio = getSizeRatio(newSize);
if (qAbs(newRatio - ratio) > 1E-3 && isVisible()) {
if (!qFuzzyCompare(newRatio, ratio) && isVisible()) {
ratio = newRatio;
recalulateBounds();
emit ratioChanged();