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:
parent
3b52402fa2
commit
7d5a59cf41
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user