]> sigrok.org Git - pulseview.git/commitdiff
Fix an isnan() issue on (at least) MinGW and Mac OS X.
authorUwe Hermann <redacted>
Thu, 1 Jan 2015 19:43:53 +0000 (20:43 +0100)
committerUwe Hermann <redacted>
Thu, 1 Jan 2015 19:43:53 +0000 (20:43 +0100)
This closes bug #531.

pv/view/viewport.cpp

index 6b85e1b79d324c4788afc40b5903b02e0497d826..d9be32c996ee142b44603d1c9097a9bcde93295a 100644 (file)
@@ -82,7 +82,8 @@ void Viewport::drag()
 
 void Viewport::drag_by(const QPoint &delta)
 {
-       if (isnan(drag_offset_))
+       // Use std::isnan() instead of isnan(), the latter can cause issues.
+       if (std::isnan(drag_offset_))
                return;
 
        view_.set_scale_offset(view_.scale(), drag_offset_ -