summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-17 02:42:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-17 02:42:24 +0300
commitad233d01f2c63dab29a0301209196dfd97856130 (patch)
tree5afb423c4fa8b7e0fff90d5f2e80a8663d8f38e8 /src
parent477e52027f123fef9cc21cd1a66617913b8e1d47 (diff)
downloadmv-ad233d01f2c63dab29a0301209196dfd97856130.tar.gz
mv-ad233d01f2c63dab29a0301209196dfd97856130.tar.bz2
mv-ad233d01f2c63dab29a0301209196dfd97856130.tar.xz
mv-ad233d01f2c63dab29a0301209196dfd97856130.zip
Fix compilation without C++11 again.
Diffstat (limited to 'src')
-rw-r--r--src/being/playerinfo.cpp2
-rw-r--r--src/being/playerinfo.h2
-rw-r--r--src/client.h8
-rw-r--r--src/dragdrop.h13
-rw-r--r--src/dyetool/client.h8
-rw-r--r--src/gui/widgets/itemcontainer.cpp6
-rw-r--r--src/gui/windows/connectiondialog.cpp2
-rw-r--r--src/gui/windows/connectiondialog.h4
-rw-r--r--src/gui/windows/equipmentwindow.cpp4
-rw-r--r--src/gui/windows/quitdialog.cpp2
-rw-r--r--src/input/inputmanager.cpp2
-rw-r--r--src/spellmanager.cpp2
-rw-r--r--src/textcommand.h6
13 files changed, 31 insertions, 30 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index d7298587d..a374d8b5b 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -460,7 +460,7 @@ void gameDestroyed()
#endif
}
-void stateChange(const State state)
+void stateChange(const StateT state)
{
if (state == State::GAME)
{
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h
index 3a74754e1..c45ba8a06 100644
--- a/src/being/playerinfo.h
+++ b/src/being/playerinfo.h
@@ -227,7 +227,7 @@ namespace PlayerInfo
void gameDestroyed();
- void stateChange(const State state);
+ void stateChange(const StateT state);
void triggerAttr(const AttributesT id,
const int old);
diff --git a/src/client.h b/src/client.h
index 95607ba08..8ffad378c 100644
--- a/src/client.h
+++ b/src/client.h
@@ -82,10 +82,10 @@ class Client final : public ConfigListener,
static int testsExec();
- void setState(const State state)
+ void setState(const StateT state)
{ mState = state; }
- State getState() const A_WARN_UNUSED
+ StateT getState() const A_WARN_UNUSED
{ return mState; }
static bool isTmw() A_WARN_UNUSED;
@@ -142,8 +142,8 @@ class Client final : public ConfigListener,
Button *mCloseButton;
#endif
- State mState;
- State mOldState;
+ StateT mState;
+ StateT mOldState;
Skin *mSkin;
int mButtonPadding;
diff --git a/src/dragdrop.h b/src/dragdrop.h
index 387d3b4a9..ef4c2b844 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -39,7 +39,8 @@
class DragDrop final
{
public:
- DragDrop(Item *const item, const DragDropSource source) :
+ DragDrop(Item *const item,
+ const DragDropSourceT source) :
mItemImage(item ? item->getImage() : nullptr),
mText(),
mSource(source),
@@ -70,11 +71,11 @@ class DragDrop final
Image *getItemImage()
{ return mItemImage; }
- DragDropSource getSource() const
+ DragDropSourceT getSource() const
{ return mSource; }
void dragItem(const Item *const item,
- const DragDropSource source,
+ const DragDropSourceT source,
const int tag = 0)
{
if (mItemImage)
@@ -103,7 +104,7 @@ class DragDrop final
}
void dragCommand(const TextCommand *const command,
- const DragDropSource source,
+ const DragDropSourceT source,
const int tag = 0)
{
if (mItemImage)
@@ -137,7 +138,7 @@ class DragDrop final
}
void dragSkill(const SkillInfo *const info,
- const DragDropSource source,
+ const DragDropSourceT source,
const int tag = 0)
{
if (mItemImage)
@@ -240,7 +241,7 @@ class DragDrop final
private:
Image *mItemImage;
std::string mText;
- DragDropSource mSource;
+ DragDropSourceT mSource;
int mItem;
int mSelItem;
int mTag;
diff --git a/src/dyetool/client.h b/src/dyetool/client.h
index 40a72ef9d..5198d41b7 100644
--- a/src/dyetool/client.h
+++ b/src/dyetool/client.h
@@ -68,10 +68,10 @@ class Client final : public ActionListener
static int testsExec();
- void setState(const State state)
+ void setState(const StateT state)
{ mState = state; }
- State getState() const A_WARN_UNUSED
+ StateT getState() const A_WARN_UNUSED
{ return mState; }
void action(const ActionEvent &event) override final;
@@ -108,8 +108,8 @@ class Client final : public ActionListener
Button *mCloseButton;
#endif
- State mState;
- State mOldState;
+ StateT mState;
+ StateT mOldState;
Skin *mSkin;
int mButtonPadding;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 108dc8638..e17cb711e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -575,7 +575,7 @@ void ItemContainer::mousePressed(MouseEvent &event)
if (item && mDescItems && chatWindow)
chatWindow->addItemText(item->getInfo().getName());
- DragDropSource src = DragDropSource::Empty;
+ DragDropSourceT src = DragDropSource::Empty;
switch (mInventory->getType())
{
case InventoryType::Inventory:
@@ -681,8 +681,8 @@ void ItemContainer::mouseReleased(MouseEvent &event)
}
else if (mInventory)
{
- const DragDropSource src = dragDrop.getSource();
- DragDropSource dst = DragDropSource::Empty;
+ const DragDropSourceT src = dragDrop.getSource();
+ DragDropSourceT dst = DragDropSource::Empty;
switch (mInventory->getType())
{
case InventoryType::Inventory:
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index 4ccab789f..2195bbc27 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -36,7 +36,7 @@
extern bool mStatsReUpdated;
ConnectionDialog::ConnectionDialog(const std::string &text,
- const State cancelState) :
+ const StateT cancelState) :
Window("", Modal_false, nullptr, "connection.xml"),
ActionListener(),
mCancelState(cancelState)
diff --git a/src/gui/windows/connectiondialog.h b/src/gui/windows/connectiondialog.h
index b7318d79f..db284db29 100644
--- a/src/gui/windows/connectiondialog.h
+++ b/src/gui/windows/connectiondialog.h
@@ -46,7 +46,7 @@ class ConnectionDialog final : public Window,
*
* @see Window::Window
*/
- ConnectionDialog(const std::string &text, const State cancelState);
+ ConnectionDialog(const std::string &text, const StateT cancelState);
A_DELETE_COPY(ConnectionDialog)
@@ -63,7 +63,7 @@ class ConnectionDialog final : public Window,
void safeDraw(Graphics *graphics) override final A_NONNULL(2);
private:
- State mCancelState;
+ StateT mCancelState;
};
#endif // GUI_WINDOWS_CONNECTIONDIALOG_H
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index b3accf9ed..54b3f2f7c 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -358,7 +358,7 @@ void EquipmentWindow::action(const ActionEvent &event)
}
else if (eventId == "playerbox")
{
- const DragDropSource src = dragDrop.getSource();
+ const DragDropSourceT src = dragDrop.getSource();
if (dragDrop.isEmpty() || (src != DragDropSource::Inventory
&& src != DragDropSource::Equipment))
{
@@ -501,7 +501,7 @@ void EquipmentWindow::mousePressed(MouseEvent& event)
void EquipmentWindow::mouseReleased(MouseEvent &event)
{
Window::mouseReleased(event);
- const DragDropSource src = dragDrop.getSource();
+ const DragDropSourceT src = dragDrop.getSource();
if (dragDrop.isEmpty() || (src != DragDropSource::Inventory
&& src != DragDropSource::Equipment))
{
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 1f876e731..1d6290152 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -72,7 +72,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe) :
addKeyListener(this);
ContainerPlacer placer = getPlacer(0, 0);
- const State state = client->getState();
+ const StateT state = client->getState();
mNeedForceQuit = (state == State::CHOOSE_SERVER
|| state == State::CONNECT_SERVER || state == State::LOGIN
|| state == State::PRE_LOGIN || state == State::LOGIN_ATTEMPT
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 8fe1e80de..5efc05f2f 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -864,7 +864,7 @@ bool InputManager::executeChatCommand(const InputActionT keyNum,
void InputManager::updateKeyActionMap(KeyToActionMap &actionMap,
KeyToIdMap &idMap,
KeyTimeMap &keyTimeMap,
- const InputType type) const
+ const InputTypeT type) const
{
actionMap.clear();
keyTimeMap.clear();
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index 4383f9331..316ca5530 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -284,7 +284,7 @@ void SpellManager::load(const bool oldConfig)
std::string icon = cfg->getValue("commandShortcutIcon"
+ toString(i), "");
- if (static_cast<TextCommandType>(commandType) ==
+ if (static_cast<TextCommandTypeT>(commandType) ==
TextCommandType::Magic)
{
addSpell(new TextCommand(i, symbol, cmd, comment,
diff --git a/src/textcommand.h b/src/textcommand.h
index cf7df586a..1b5bad71b 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -107,7 +107,7 @@ class TextCommand final
unsigned getSchoolLvl() const A_WARN_UNUSED
{ return mSchoolLvl; }
- TextCommandType getCommandType() const A_WARN_UNUSED
+ TextCommandTypeT getCommandType() const A_WARN_UNUSED
{ return mCommandType; }
void setCommand(const std::string &command)
@@ -140,7 +140,7 @@ class TextCommand final
void setSchoolLvl(const unsigned int schoolLvl)
{ mSchoolLvl = schoolLvl; }
- void setCommandType(const TextCommandType commandType)
+ void setCommandType(const TextCommandTypeT commandType)
{ mCommandType = commandType; }
bool isEmpty() const A_WARN_UNUSED
@@ -163,7 +163,7 @@ class TextCommand final
MagicSchoolT mSchool;
unsigned mBaseLvl;
unsigned mSchoolLvl;
- TextCommandType mCommandType;
+ TextCommandTypeT mCommandType;
Image *mImage;
};