зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1194954 - Fix -Wunreachable-code warnings in gfx/layers and gfx/thebes. r=BenWa
This commit is contained in:
Родитель
8b1de6b820
Коммит
fa48ec17dc
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче