diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-14 02:54:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-14 02:54:44 +0300 |
commit | 84499779fcf0c8b5392a88f1c9311775e692ebef (patch) | |
tree | f390326a50eed73d8f8c62107979a4d81093ce52 /src/gui/widgets/layout.cpp | |
parent | 4ee30f47b491de0ace9b692072fd286cf12c7828 (diff) | |
download | plus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.gz plus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.bz2 plus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.xz plus-84499779fcf0c8b5392a88f1c9311775e692ebef.zip |
Improve a bit some gui controls speed.
Diffstat (limited to 'src/gui/widgets/layout.cpp')
-rw-r--r-- | src/gui/widgets/layout.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 6ad1bb71b..96c6dffee 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -88,8 +88,9 @@ void LayoutCell::computeSizes() std::vector <std::vector <LayoutCell *> >::const_iterator i = mArray->mCells.begin(); - - while (i != mArray->mCells.end()) + std::vector <std::vector <LayoutCell *> >::const_iterator + i_end = mArray->mCells.end(); + while (i != i_end) { std::vector <LayoutCell *>::const_iterator j = i->begin(); while (j != i->end()) @@ -115,10 +116,13 @@ LayoutArray::~LayoutArray() { std::vector <std::vector <LayoutCell *> >::iterator i = mCells.begin(); - while (i != mCells.end()) + std::vector <std::vector <LayoutCell *> >::iterator + i_end = mCells.end(); + while (i != i_end) { std::vector< LayoutCell * >::iterator j = i->begin(); - while (j != i->end()) + std::vector< LayoutCell * >::iterator j_end = i->end(); + while (j != j_end) { delete *j; ++j; @@ -158,7 +162,9 @@ void LayoutArray::resizeGrid(int w, const int h) std::vector <std::vector <LayoutCell *> >::iterator i = mCells.begin(); - while (i != mCells.end()) + std::vector <std::vector <LayoutCell *> >::iterator + i_end = mCells.end(); + while (i != i_end) { i->resize(w, nullptr); ++i; |