diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-08-01 11:20:44 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-08-01 11:20:44 +0200 |
commit | e71f7af1d619d02667c2bfb9f5fd0d925e534230 (patch) | |
tree | 3233779695f5f559e5392289a322bfb78a43dd3b /video/video-widget.cpp | |
parent | 4ffb8feee67856851351e972e33c72c025c2c29d (diff) |
spline, video: get rid of needless casts
Diffstat (limited to 'video/video-widget.cpp')
-rw-r--r-- | video/video-widget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/video/video-widget.cpp b/video/video-widget.cpp index 4394fec7..9100e0ea 100644 --- a/video/video-widget.cpp +++ b/video/video-widget.cpp @@ -33,13 +33,12 @@ void video_widget::update_image(const QImage& img) set_fresh(true); } -void video_widget::set_image(const unsigned char* src, int width, int height, - unsigned stride, QImage::Format fmt) +void video_widget::set_image(const unsigned char* src, int width, int height, int stride, QImage::Format fmt) { QMutexLocker l(&mtx); texture = QImage(); - unsigned nbytes = stride * height; + unsigned nbytes = (unsigned)(stride * height); vec.resize(nbytes); vec.shrink_to_fit(); std::memcpy(vec.data(), src, nbytes); texture = QImage((const unsigned char*)vec.data(), width, height, stride, fmt); |