diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 22:25:22 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:05:21 +0200 |
commit | d65936200a2756e6619a109fa6fa673b91df802e (patch) | |
tree | 80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /cv/video-widget.cpp | |
parent | 4046773c41ee3c0f65840828ab983cfd13451c85 (diff) |
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'cv/video-widget.cpp')
-rw-r--r-- | cv/video-widget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp index fd4fe350..d93429cb 100644 --- a/cv/video-widget.cpp +++ b/cv/video-widget.cpp @@ -8,6 +8,7 @@ #include "video-widget.hpp" #include "compat/check-visible.hpp" +#include "compat/math.hpp" #include <cstring> @@ -88,8 +89,8 @@ void cv_video_widget::paintEvent(QPaintEvent*) double dpr = devicePixelRatioF(); - int W = int(QWidget::width() * dpr); - int H = int(QWidget::height() * dpr); + int W = iround(QWidget::width() * dpr); + int H = iround(QWidget::height() * dpr); painter.drawImage(rect(), texture); |