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/gui/widgets/layout.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/gui/widgets/layout.cpp')
-rw-r--r-- | src/gui/widgets/layout.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 68783ddc..ac8488e0 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -71,11 +71,11 @@ void LayoutCell::computeSizes() { assert(mType == ARRAY); - for (std::vector< std::vector< LayoutCell * > >::iterator + for (auto i = mArray->mCells.begin(), i_end = mArray->mCells.end(); i != i_end; ++i) { - for (std::vector< LayoutCell * >::iterator + for (auto j = i->begin(), j_end = i->end(); j != j_end; ++j) { LayoutCell *cell = *j; @@ -93,10 +93,10 @@ LayoutArray::LayoutArray(): mSpacing(4) LayoutArray::~LayoutArray() { - for (std::vector< std::vector< LayoutCell * > >::iterator + for (auto i = mCells.begin(), i_end = mCells.end(); i != i_end; ++i) { - for (std::vector< LayoutCell * >::iterator + for (auto j = i->begin(), j_end = i->end(); j != j_end; ++j) { delete *j; @@ -133,10 +133,10 @@ void LayoutArray::resizeGrid(int w, int h) mSizes[0].resize(w, Layout::AUTO_DEF); } - for (std::vector< std::vector< LayoutCell * > >::iterator + for (auto i = mCells.begin(), i_end = mCells.end(); i != i_end; ++i) { - i->resize(w, NULL); + i->resize(w, nullptr); } } |