Make BaseArch getDecalGraphics return an empty range
Fix assertion failure when opening the GUI on an arch without any decals. Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
ad7bb51030
commit
c956cae824
@ -1375,7 +1375,7 @@ template <typename R> struct BaseArch : ArchAPI<R>
|
|||||||
// Decal methods
|
// Decal methods
|
||||||
virtual typename R::DecalGfxRangeT getDecalGraphics(DecalId decal) const override
|
virtual typename R::DecalGfxRangeT getDecalGraphics(DecalId decal) const override
|
||||||
{
|
{
|
||||||
NPNR_ASSERT_FALSE("unreachable");
|
return empty_if_possible<typename R::DecalGfxRangeT>();
|
||||||
};
|
};
|
||||||
virtual DecalXY getBelDecal(BelId bel) const override { return DecalXY(); }
|
virtual DecalXY getBelDecal(BelId bel) const override { return DecalXY(); }
|
||||||
virtual DecalXY getWireDecal(WireId wire) const override { return DecalXY(); }
|
virtual DecalXY getWireDecal(WireId wire) const override { return DecalXY(); }
|
||||||
|
@ -573,7 +573,7 @@ Return the graphic elements that make up a decal.
|
|||||||
The same decal must always produce the same list. If the graphics for
|
The same decal must always produce the same list. If the graphics for
|
||||||
a design element changes, that element must return another decal.
|
a design element changes, that element must return another decal.
|
||||||
|
|
||||||
*BaseArch default: asserts false as unreachable due to there being no decals*
|
*BaseArch default: returns default-constructed range*
|
||||||
|
|
||||||
### DecalXY getBelDecal(BelId bel) const
|
### DecalXY getBelDecal(BelId bel) const
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user