diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/textmanager.cpp | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-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/textmanager.cpp')
-rw-r--r-- | src/textmanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/textmanager.cpp b/src/textmanager.cpp index 00bdd49c..5f87bd29 100644 --- a/src/textmanager.cpp +++ b/src/textmanager.cpp @@ -25,7 +25,7 @@ #include <cstring> -TextManager *textManager = 0; +TextManager *textManager = nullptr; TextManager::TextManager() { @@ -33,7 +33,7 @@ TextManager::TextManager() void TextManager::addText(Text *text) { - place(text, 0, text->mX, text->mY, text->mHeight); + place(text, nullptr, text->mX, text->mY, text->mHeight); mTextList.push_back(text); } @@ -46,7 +46,7 @@ void TextManager::moveText(Text *text, int x, int y) void TextManager::removeText(const Text *text) { - for (TextList::iterator ptr = mTextList.begin(), + for (auto ptr = mTextList.begin(), pEnd = mTextList.end(); ptr != pEnd; ++ptr) { if (*ptr == text) @@ -63,7 +63,7 @@ TextManager::~TextManager() void TextManager::draw(gcn::Graphics *graphics, int xOff, int yOff) { - for (TextList::iterator bPtr = mTextList.begin(), ePtr = mTextList.end(); + for (auto bPtr = mTextList.begin(), ePtr = mTextList.end(); bPtr != ePtr; ++bPtr) { (*bPtr)->draw(graphics, xOff, yOff); |