summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textpreview.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/widgets/textpreview.cpp
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadMana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
Mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
Mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
Mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/gui/widgets/textpreview.cpp')
-rw-r--r--src/gui/widgets/textpreview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index b0963d30..d6ef172c 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -38,7 +38,7 @@ TextPreview::TextPreview(const std::string &text):
mTextAlpha = false;
mFont = gui->getFont();
mTextColor = &Theme::getThemeColor(Theme::TEXT);
- mTextBGColor = NULL;
+ mTextBGColor = nullptr;
mBGColor = &Theme::getThemeColor(Theme::BACKGROUND);
mOpaque = false;
}
@@ -64,7 +64,7 @@ void TextPreview::draw(gcn::Graphics* graphics)
if (mTextBGColor && typeid(*mFont) == typeid(TrueTypeFont))
{
- TrueTypeFont *font = static_cast<TrueTypeFont*>(mFont);
+ auto *font = static_cast<TrueTypeFont*>(mFont);
int x = font->getWidth(mText) + 1 + 2 * ((mOutline || mShadow) ? 1 :0);
int y = font->getHeight() + 1 + 2 * ((mOutline || mShadow) ? 1 : 0);
graphics->setColor(gcn::Color((int) mTextBGColor->r,