Utility/Font: Remove useless atlas release slot
This commit is contained in:
parent
f6e2871224
commit
c741bad9a1
|
|
@ -130,7 +130,6 @@ namespace Nz
|
|||
UInt64 ComputeKey(unsigned int characterSize, TextStyleFlags style, float outlineThickness) const;
|
||||
void OnAtlasCleared(const AbstractAtlas* atlas);
|
||||
void OnAtlasLayerChange(const AbstractAtlas* atlas, AbstractImage* oldLayer, AbstractImage* newLayer);
|
||||
void OnAtlasRelease(const AbstractAtlas* atlas);
|
||||
const Glyph& PrecacheGlyph(GlyphMap& glyphMap, unsigned int characterSize, TextStyleFlags style, float outlineThickness, char32_t character) const;
|
||||
|
||||
static bool Initialize();
|
||||
|
|
@ -138,7 +137,6 @@ namespace Nz
|
|||
|
||||
NazaraSlot(AbstractAtlas, OnAtlasCleared, m_atlasClearedSlot);
|
||||
NazaraSlot(AbstractAtlas, OnAtlasLayerChange, m_atlasLayerChangeSlot);
|
||||
NazaraSlot(AbstractAtlas, OnAtlasRelease, m_atlasReleaseSlot);
|
||||
|
||||
std::shared_ptr<AbstractAtlas> m_atlas;
|
||||
std::unique_ptr<FontData> m_data;
|
||||
|
|
|
|||
|
|
@ -285,13 +285,11 @@ namespace Nz
|
|||
{
|
||||
m_atlasClearedSlot.Connect(m_atlas->OnAtlasCleared, this, &Font::OnAtlasCleared);
|
||||
m_atlasLayerChangeSlot.Connect(m_atlas->OnAtlasLayerChange, this, &Font::OnAtlasLayerChange);
|
||||
m_atlasReleaseSlot.Connect(m_atlas->OnAtlasRelease, this, &Font::OnAtlasRelease);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_atlasClearedSlot.Disconnect();
|
||||
m_atlasLayerChangeSlot.Disconnect();
|
||||
m_atlasReleaseSlot.Disconnect();
|
||||
}
|
||||
|
||||
OnFontAtlasChanged(this);
|
||||
|
|
@ -445,23 +443,6 @@ namespace Nz
|
|||
OnFontAtlasLayerChanged(this, oldLayer, newLayer);
|
||||
}
|
||||
|
||||
void Font::OnAtlasRelease(const AbstractAtlas* atlas)
|
||||
{
|
||||
NazaraUnused(atlas);
|
||||
|
||||
#ifdef NAZARA_DEBUG
|
||||
// Est-ce qu'il s'agit bien de notre atlas ?
|
||||
if (m_atlas.get() != atlas)
|
||||
{
|
||||
NazaraInternalError("Notified by a non-listening-to resource");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Nous ne pouvons pas faire grand chose d'autre que de balancer une erreur à la tête de l'utilisateur avant un potentiel crash...
|
||||
NazaraError("Atlas has been released while in use");
|
||||
}
|
||||
|
||||
const Font::Glyph& Font::PrecacheGlyph(GlyphMap& glyphMap, unsigned int characterSize, TextStyleFlags style, float outlineThickness, char32_t character) const
|
||||
{
|
||||
auto it = glyphMap.find(character);
|
||||
|
|
|
|||
Loading…
Reference in New Issue