diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-18 16:23:35 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-21 08:08:46 +0000 |
commit | 71a6b1b62041981f894cb2b6589fce92f137bbc4 (patch) | |
tree | 8b9368c9b90af7219136354d3f1617a7b523194e /src/plugins/common/evr | |
parent | d48fbf286b6ae88218286d35493cd5416a7713a9 (diff) |
DirectShow: Fix MinGW warnings about signedness of comparison.
Use a switch on int instead of else if.
common\evr\evrcustompresenter.cpp: In member function 'virtual bool EVRCustomPresenter::event(QEvent*)':
common\evr\evrcustompresenter.cpp:1882:22: warning: comparison between 'enum QEvent::Type' and 'enum EVRCustomPresenter::PresenterEvents' [-Wenum-compare]
if (e->type() == StartSurface) {
^
common\evr\evrcustompresenter.cpp:1885:29: warning: comparison between 'enum QEvent::Type' and 'enum EVRCustomPresenter::PresenterEvents' [-Wenum-compare]
} else if (e->type() == StopSurface) {
^
common\evr\evrcustompresenter.cpp:1888:29: warning: comparison between 'enum QEvent::Type' and 'enum EVRCustomPresenter::PresenterEvents' [-Wenum-compare]
} else if (e->type() == PresentSample) {
Change-Id: I8533e2c6d9b0a01b7b95e1d8bb119b50d4aabd25
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src/plugins/common/evr')
-rw-r--r-- | src/plugins/common/evr/evrcustompresenter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp index 49623e891..4acf3aa64 100644 --- a/src/plugins/common/evr/evrcustompresenter.cpp +++ b/src/plugins/common/evr/evrcustompresenter.cpp @@ -1872,18 +1872,19 @@ float EVRCustomPresenter::getMaxRate(bool thin) bool EVRCustomPresenter::event(QEvent *e) { - if (e->type() == StartSurface) { + switch (int(e->type())) { + case StartSurface: startSurface(); return true; - } else if (e->type() == StopSurface) { + case StopSurface: stopSurface(); return true; - } else if (e->type() == PresentSample) { - PresentSampleEvent *ev = static_cast<PresentSampleEvent *>(e); - presentSample(ev->sample()); + case PresentSample: + presentSample(static_cast<PresentSampleEvent *>(e)->sample()); return true; + default: + break; } - return QObject::event(e); } |