Make Text::getFont return a reference
because a the m_font pointer cannot be null.
This commit is contained in:
parent
623d0f67ea
commit
3d2944998d
@ -283,16 +283,15 @@ public:
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the text's font
|
||||
///
|
||||
/// If the text has no font attached, a null pointer is returned.
|
||||
/// The returned pointer is const, which means that you
|
||||
/// The returned reference is const, which means that you
|
||||
/// cannot modify the font when you get it from this function.
|
||||
///
|
||||
/// \return Pointer to the text's font
|
||||
/// \return Reference to the text's font
|
||||
///
|
||||
/// \see setFont
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
const Font* getFont() const;
|
||||
const Font& getFont() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the character size
|
||||
|
@ -241,9 +241,9 @@ const String& Text::getString() const
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
const Font* Text::getFont() const
|
||||
const Font& Text::getFont() const
|
||||
{
|
||||
return m_font;
|
||||
return *m_font;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user