summaryrefslogtreecommitdiff
path: root/src/gui/gui.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/gui.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/gui.cpp')
-rw-r--r--src/gui/gui.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 64509e21..e0487d95 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -45,14 +45,14 @@
#include <guichan/image.hpp>
// Guichan stuff
-Gui *gui = 0;
-SDLInput *guiInput = 0;
+Gui *gui = nullptr;
+SDLInput *guiInput = nullptr;
// Bolded font
-gcn::Font *boldFont = 0;
+gcn::Font *boldFont = nullptr;
// Mono font
-gcn::Font *monoFont = 0;
+gcn::Font *monoFont = nullptr;
class GuiConfigListener : public EventListener
{
@@ -61,7 +61,7 @@ class GuiConfigListener : public EventListener
mGui(g)
{}
- void event(Event::Channel channel, const Event &event)
+ void event(Event::Channel channel, const Event &event) override
{
if (channel == Event::ConfigChannel)
{
@@ -79,7 +79,7 @@ class GuiConfigListener : public EventListener
Gui::Gui(Graphics *graphics):
mCustomCursor(false),
- mMouseCursors(NULL),
+ mMouseCursors(nullptr),
mMouseCursorAlpha(1.0f),
mMouseInactivityTimer(0),
mCursorType(CURSOR_POINTER)
@@ -97,7 +97,7 @@ Gui::Gui(Graphics *graphics):
mFocusHandler = new FocusHandler;
// Initialize top GUI widget
- WindowContainer *guiTop = new WindowContainer;
+ auto *guiTop = new WindowContainer;
guiTop->setFocusable(true);
guiTop->setSize(graphics->getWidth(), graphics->getHeight());
guiTop->setOpaque(false);
@@ -225,7 +225,7 @@ void Gui::draw()
void Gui::videoResized()
{
- WindowContainer *top = static_cast<WindowContainer*>(getTop());
+ auto *top = static_cast<WindowContainer*>(getTop());
int oldWidth = top->getWidth();
int oldHeight = top->getHeight();
@@ -260,7 +260,7 @@ void Gui::setUseCustomCursor(bool customCursor)
if (mMouseCursors)
{
mMouseCursors->decRef();
- mMouseCursors = NULL;
+ mMouseCursors = nullptr;
}
}
}