Commit 00e789a4 authored by Edric Milaret's avatar Edric Milaret Committed by Guillaume Roguez

im: fix non necessary cast

also fix warning about enum value not handled

Refs #74275

Change-Id: I1352aeaa57878640e982e4ff12157b792d9bdbc1
parent f25d3bd3
......@@ -251,12 +251,12 @@ CallWidget::setMediaText(Call *call)
void
CallWidget::mediaAdd(Media::Media *media)
{
switch(static_cast<int>(media->type())) {
case 0: /*AUDIO*/
switch(media->type()) {
case Media::Media::Type::AUDIO:
break;
case 1: /*VIDEO*/
case Media::Media::Type::VIDEO:
break;
case 2: /*TEXT*/
case Media::Media::Type::TEXT:
if (media->direction() == Media::Text::Direction::IN) {
ui->messageOutput->setModel(
static_cast<Media::Text*>(media)->recording()->
......@@ -267,7 +267,9 @@ CallWidget::mediaAdd(Media::Media *media)
ui->messageOutput->show();
}
break;
case 3: /*FILE*/
case Media::Media::Type::FILE:
break;
default:
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment