diff options
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 20c100e5..a22c795c 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -73,13 +73,15 @@ void TabbedArea::draw(gcn::Graphics *graphics) gcn::Widget* TabbedArea::getWidget(const std::string &name) { - unsigned int i; - for (i = 0; i < mTabs.size(); i++) + std::vector< std::pair<gcn::Tab*, gcn::Widget*> >::iterator itr = mTabs.begin(), + itr_end = mTabs.end(); + while (itr != itr_end) { - if (mTabs[i].first->getCaption() == name) + if ((*itr).first->getCaption() == name) { - return mTabs[i].second; + return (*itr).second; } + ++itr; } return NULL; |