Bug 1194954 - Fix -Wunreachable-code warnings in gfx/layers and gfx/thebes. r=BenWa

This commit is contained in:
Chris Peterson 2015-06-03 23:13:42 -07:00
Родитель 8b1de6b820
Коммит fa48ec17dc
2 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -483,11 +483,15 @@ CloneLayerTreePropertiesInternal(Layer* aRoot, bool aIsMask /* = false */)
return MakeUnique<ColorLayerProperties>(static_cast<ColorLayer*>(aRoot));
case Layer::TYPE_IMAGE:
return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot), aIsMask);
default:
case Layer::TYPE_CANVAS:
case Layer::TYPE_READBACK:
case Layer::TYPE_SHADOW:
case Layer::TYPE_PAINTED:
return MakeUnique<LayerPropertiesBase>(aRoot);
}
return UniquePtr<LayerPropertiesBase>(nullptr);
MOZ_ASSERT_UNREACHABLE("Unexpected root layer type");
return MakeUnique<LayerPropertiesBase>(aRoot);
}
/* static */ UniquePtr<LayerProperties>

Просмотреть файл

@ -2065,26 +2065,19 @@ gfxPlatform::GetLog(eGfxLog aWhichLog)
switch (aWhichLog) {
case eGfxLog_fontlist:
return sFontlistLog;
break;
case eGfxLog_fontinit:
return sFontInitLog;
break;
case eGfxLog_textrun:
return sTextrunLog;
break;
case eGfxLog_textrunui:
return sTextrunuiLog;
break;
case eGfxLog_cmapdata:
return sCmapDataLog;
break;
case eGfxLog_textperf:
return sTextPerfLog;
break;
default:
break;
}
MOZ_ASSERT_UNREACHABLE("Unexpected log type");
return nullptr;
}