summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup.cpp6
-rw-r--r--src/gui/tradewindow.h2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/playerbox.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp6
-rw-r--r--src/gui/widgets/tab.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp2
9 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index f378572b..930408ac 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -38,6 +38,8 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
+#include <functional>
+
extern Window *statusWindow;
Setup::Setup():
@@ -103,12 +105,12 @@ void Setup::action(const gcn::ActionEvent &event)
if (event.getId() == "Apply")
{
setVisible(false);
- for_each(mTabs.begin(), mTabs.end(), std::mem_fun(&SetupTab::apply));
+ for_each(mTabs.begin(), mTabs.end(), std::mem_fn(&SetupTab::apply));
}
else if (event.getId() == "Cancel")
{
setVisible(false);
- for_each(mTabs.begin(), mTabs.end(), std::mem_fun(&SetupTab::cancel));
+ for_each(mTabs.begin(), mTabs.end(), std::mem_fn(&SetupTab::cancel));
}
else if (event.getId() == "Reset Windows")
{
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index 59ddcbdc..20da4574 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -117,7 +117,7 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener
*/
void setStatus(Status s);
- typedef const std::auto_ptr<Inventory> InventoryPtr;
+ typedef const std::unique_ptr<Inventory> InventoryPtr;
InventoryPtr mMyInventory;
InventoryPtr mPartnerInventory;
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 4a31fa63..9247f67a 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -182,7 +182,7 @@ Button::~Button()
{
for (int mode = 0; mode < BUTTON_COUNT; ++mode)
{
- for_each(mButton[mode].grid, mButton[mode].grid + 9,
+ std::for_each(mButton[mode].grid, mButton[mode].grid + 9,
dtor<Image*>());
}
delete[] mButton;
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index e90f6073..101afaef 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -102,7 +102,7 @@ DropDown::~DropDown()
buttons[1][0]->decRef();
buttons[1][1]->decRef();
- for_each(skin.grid, skin.grid + 9, dtor<Image*>());
+ std::for_each(skin.grid, skin.grid + 9, dtor<Image*>());
}
delete mScrollArea;
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 5c5976c1..4f341af0 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -75,7 +75,7 @@ PlayerBox::~PlayerBox()
if (instances == 0)
{
- for_each(background.grid, background.grid + 9, dtor<Image*>());
+ std::for_each(background.grid, background.grid + 9, dtor<Image*>());
}
}
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 27b194ff..4695f5ab 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -88,7 +88,7 @@ ProgressBar::~ProgressBar()
if (mInstances == 0)
{
- for_each(mBorder.grid, mBorder.grid + 9, dtor<Image*>());
+ std::for_each(mBorder.grid, mBorder.grid + 9, dtor<Image*>());
}
}
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index d5e824e1..c95adeaa 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -66,9 +66,9 @@ ScrollArea::~ScrollArea()
if (instances == 0)
{
- for_each(background.grid, background.grid + 9, dtor<Image*>());
- for_each(vMarker.grid, vMarker.grid + 9, dtor<Image*>());
- for_each(vMarkerHi.grid, vMarkerHi.grid + 9, dtor<Image*>());
+ std::for_each(background.grid, background.grid + 9, dtor<Image*>());
+ std::for_each(vMarker.grid, vMarker.grid + 9, dtor<Image*>());
+ std::for_each(vMarkerHi.grid, vMarkerHi.grid + 9, dtor<Image*>());
buttons[UP][0]->decRef();
buttons[UP][1]->decRef();
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 17b7108f..c8ed2141 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -76,7 +76,7 @@ Tab::~Tab()
{
for (int mode = 0; mode < TAB_COUNT; mode++)
{
- for_each(tabImg[mode].grid, tabImg[mode].grid + 9, dtor<Image*>());
+ std::for_each(tabImg[mode].grid, tabImg[mode].grid + 9, dtor<Image*>());
}
}
}
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index ec57f1c7..e7c279b2 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -84,7 +84,7 @@ TextField::~TextField()
instances--;
if (instances == 0)
- for_each(skin.grid, skin.grid + 9, dtor<Image*>());
+ std::for_each(skin.grid, skin.grid + 9, dtor<Image*>());
}
void TextField::updateAlpha()