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>
This commit is contained in:
@@ -1872,18 +1872,19 @@ float EVRCustomPresenter::getMaxRate(bool thin)
|
|||||||
|
|
||||||
bool EVRCustomPresenter::event(QEvent *e)
|
bool EVRCustomPresenter::event(QEvent *e)
|
||||||
{
|
{
|
||||||
if (e->type() == StartSurface) {
|
switch (int(e->type())) {
|
||||||
|
case StartSurface:
|
||||||
startSurface();
|
startSurface();
|
||||||
return true;
|
return true;
|
||||||
} else if (e->type() == StopSurface) {
|
case StopSurface:
|
||||||
stopSurface();
|
stopSurface();
|
||||||
return true;
|
return true;
|
||||||
} else if (e->type() == PresentSample) {
|
case PresentSample:
|
||||||
PresentSampleEvent *ev = static_cast<PresentSampleEvent *>(e);
|
presentSample(static_cast<PresentSampleEvent *>(e)->sample());
|
||||||
presentSample(ev->sample());
|
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QObject::event(e);
|
return QObject::event(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user