summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
commit9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch)
treec084bdf8afabc6220779645dcb5dbf71af6a151f /src/guichan/widgets/tabbedarea.cpp
parentbc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff)
downloadmanaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/guichan/widgets/tabbedarea.cpp')
-rw-r--r--src/guichan/widgets/tabbedarea.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/guichan/widgets/tabbedarea.cpp b/src/guichan/widgets/tabbedarea.cpp
index 3c556eeca..4ee164778 100644
--- a/src/guichan/widgets/tabbedarea.cpp
+++ b/src/guichan/widgets/tabbedarea.cpp
@@ -62,7 +62,7 @@
namespace gcn
{
TabbedArea::TabbedArea() :
- mSelectedTab(NULL),
+ mSelectedTab(nullptr),
mOpaque(false)
{
setFocusable(true);
@@ -83,14 +83,14 @@ namespace gcn
remove(mWidgetContainer);
delete mTabContainer;
- mTabContainer = 0;
+ mTabContainer = nullptr;
delete mWidgetContainer;
- mWidgetContainer = 0;
+ mWidgetContainer = nullptr;
for (unsigned int i = 0; i < mTabsToDelete.size(); i++)
{
delete mTabsToDelete[i];
- mTabsToDelete[i] = 0;
+ mTabsToDelete[i] = nullptr;
}
}
@@ -102,7 +102,7 @@ namespace gcn
mTabContainer->add(tab);
mTabs.push_back(std::pair<Tab*, Widget*>(tab, widget));
- if (mSelectedTab == NULL)
+ if (!mSelectedTab)
setSelectedTab(tab);
adjustTabPositions();
@@ -224,7 +224,7 @@ namespace gcn
// If a tab is selected, remove the line right underneath
// the selected tab.
- if (mSelectedTab != NULL)
+ if (mSelectedTab)
{
graphics->setColor(getBaseColor());
graphics->drawLine(mSelectedTab->getX() + 1,
@@ -332,7 +332,7 @@ namespace gcn
{
Tab* tab = dynamic_cast<Tab*>(event.getSource());
- if (tab != NULL)
+ if (tab)
removeTab(tab);
else
BasicContainer::death(event);
@@ -343,7 +343,7 @@ namespace gcn
Widget* source = actionEvent.getSource();
Tab* tab = dynamic_cast<Tab*>(source);
- if (tab == NULL)
+ if (!tab)
{
throw GCN_EXCEPTION("Received an action from a "
"widget that's not a tab!");