1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:07:34 +00:00

FontEditor: Tighten type of UndoGlyph::undo_state (cannot fail)

This commit is contained in:
Ben Wiederhake 2021-11-20 01:37:31 +01:00 committed by Andreas Kling
parent bce5a0a00d
commit 1dfb3ff4eb

View file

@ -17,7 +17,7 @@ public:
, m_font(font) , m_font(font)
{ {
} }
RefPtr<UndoGlyph> save_state() const NonnullRefPtr<UndoGlyph> save_state() const
{ {
auto state = adopt_ref(*new UndoGlyph(m_code_point, *m_font)); auto state = adopt_ref(*new UndoGlyph(m_code_point, *m_font));
auto glyph = font().glyph(m_code_point).glyph_bitmap(); auto glyph = font().glyph(m_code_point).glyph_bitmap();
@ -70,7 +70,7 @@ public:
} }
private: private:
RefPtr<UndoGlyph> m_undo_state; NonnullRefPtr<UndoGlyph> m_undo_state;
RefPtr<UndoGlyph> m_redo_state; RefPtr<UndoGlyph> m_redo_state;
UndoGlyph& m_undo_glyph; UndoGlyph& m_undo_glyph;
}; };