зеркало из 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));
|
return MakeUnique<ColorLayerProperties>(static_cast<ColorLayer*>(aRoot));
|
||||||
case Layer::TYPE_IMAGE:
|
case Layer::TYPE_IMAGE:
|
||||||
return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot), aIsMask);
|
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 MakeUnique<LayerPropertiesBase>(aRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
return UniquePtr<LayerPropertiesBase>(nullptr);
|
MOZ_ASSERT_UNREACHABLE("Unexpected root layer type");
|
||||||
|
return MakeUnique<LayerPropertiesBase>(aRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ UniquePtr<LayerProperties>
|
/* static */ UniquePtr<LayerProperties>
|
||||||
|
|
|
@ -2065,26 +2065,19 @@ gfxPlatform::GetLog(eGfxLog aWhichLog)
|
||||||
switch (aWhichLog) {
|
switch (aWhichLog) {
|
||||||
case eGfxLog_fontlist:
|
case eGfxLog_fontlist:
|
||||||
return sFontlistLog;
|
return sFontlistLog;
|
||||||
break;
|
|
||||||
case eGfxLog_fontinit:
|
case eGfxLog_fontinit:
|
||||||
return sFontInitLog;
|
return sFontInitLog;
|
||||||
break;
|
|
||||||
case eGfxLog_textrun:
|
case eGfxLog_textrun:
|
||||||
return sTextrunLog;
|
return sTextrunLog;
|
||||||
break;
|
|
||||||
case eGfxLog_textrunui:
|
case eGfxLog_textrunui:
|
||||||
return sTextrunuiLog;
|
return sTextrunuiLog;
|
||||||
break;
|
|
||||||
case eGfxLog_cmapdata:
|
case eGfxLog_cmapdata:
|
||||||
return sCmapDataLog;
|
return sCmapDataLog;
|
||||||
break;
|
|
||||||
case eGfxLog_textperf:
|
case eGfxLog_textperf:
|
||||||
return sTextPerfLog;
|
return sTextPerfLog;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MOZ_ASSERT_UNREACHABLE("Unexpected log type");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче