summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-09-30 03:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2019-09-30 03:30:11 +0300
commitbf9fc1de4c53a88a28be48dbf7cf4795199442d4 (patch)
tree46018d5b85c669961fb2fe6ab8af06f432139999 /src
parentfdf8230a80fa418e4b46dc489e5b2dda7901b55c (diff)
downloadplus-bf9fc1de4c53a88a28be48dbf7cf4795199442d4.tar.gz
plus-bf9fc1de4c53a88a28be48dbf7cf4795199442d4.tar.bz2
plus-bf9fc1de4c53a88a28be48dbf7cf4795199442d4.tar.xz
plus-bf9fc1de4c53a88a28be48dbf7cf4795199442d4.zip
Add missing static keywords
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp2
-rw-r--r--src/being/being.h8
-rw-r--r--src/graphicsmanager.h4
-rw-r--r--src/gui/popups/itempopup.h3
-rw-r--r--src/gui/shortcut/spellshortcut.cpp2
-rw-r--r--src/gui/shortcut/spellshortcut.h2
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/chatwindow.h4
-rw-r--r--src/gui/windows/mailwindow.h2
-rw-r--r--src/gui/windows/npcdialog.h4
-rw-r--r--src/gui/windows/skilldialog.h4
-rw-r--r--src/input/inputmanager.cpp2
-rw-r--r--src/input/inputmanager.h5
-rw-r--r--src/particle/particleemitter.h2
-rw-r--r--src/particle/particleengine.cpp2
-rw-r--r--src/particle/particleengine.h2
-rw-r--r--src/progs/manaplus/client.h2
-rw-r--r--src/resources/memorymanager.h12
-rw-r--r--src/resources/sdlimagehelper.h2
19 files changed, 32 insertions, 34 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 74942999e..0459d83e9 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -869,7 +869,7 @@ void Being::takeDamage(Being *restrict const attacker,
int Being::getHitEffect(const Being *restrict const attacker,
const AttackTypeT type,
const int attackId,
- const int level) const restrict2
+ const int level)
{
if (effectManager == nullptr)
return 0;
diff --git a/src/being/being.h b/src/being/being.h
index f42cae281..0dd0a5743 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -884,10 +884,10 @@ class Being notfinal : public ActorSprite,
void recalcSpritesOrder() restrict2;
- int getHitEffect(const Being *restrict const attacker,
- const AttackTypeT type,
- const int attackId,
- const int level) const restrict2 A_WARN_UNUSED;
+ static int getHitEffect(const Being *restrict const attacker,
+ const AttackTypeT type,
+ const int attackId,
+ const int level);
CursorT getHoverCursor() const restrict2 A_WARN_UNUSED
{
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index 9033f7f63..2811bc0ec 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -78,8 +78,8 @@ class GraphicsManager final
static void setVideoMode();
- SDL_Window *createWindow(const int w, const int h,
- const int bpp, const int flags);
+ static SDL_Window *createWindow(const int w, const int h,
+ const int bpp, const int flags);
#ifdef USE_SDL2
SDL_Renderer *createRenderer(SDL_Window *const window,
diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h
index 903875b34..d42bee103 100644
--- a/src/gui/popups/itempopup.h
+++ b/src/gui/popups/itempopup.h
@@ -78,7 +78,8 @@ class ItemPopup final : public Popup
private:
std::string getCardsString(const int *const cards);
- std::string getOptionsString(const ItemOptionsList *const options);
+ static std::string getOptionsString(const ItemOptionsList *const
+ options);
Label *mItemName A_NONNULLPOINTER;
TextBox *mItemDesc A_NONNULLPOINTER;
diff --git a/src/gui/shortcut/spellshortcut.cpp b/src/gui/shortcut/spellshortcut.cpp
index cdf7d6656..5ef1d56da 100644
--- a/src/gui/shortcut/spellshortcut.cpp
+++ b/src/gui/shortcut/spellshortcut.cpp
@@ -57,7 +57,7 @@ void SpellShortcut::load()
}
}
-unsigned int SpellShortcut::getSpellsCount() const
+unsigned int SpellShortcut::getSpellsCount()
{
return SPELL_SHORTCUT_ITEMS;
}
diff --git a/src/gui/shortcut/spellshortcut.h b/src/gui/shortcut/spellshortcut.h
index 31c201872..c2facaf0d 100644
--- a/src/gui/shortcut/spellshortcut.h
+++ b/src/gui/shortcut/spellshortcut.h
@@ -48,7 +48,7 @@ class SpellShortcut final
*/
void load();
- unsigned int getSpellsCount() const A_CONST A_WARN_UNUSED;
+ static unsigned int getSpellsCount();
/**
* Set the item that is selected.
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7c4678a7e..0f0970c51 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1929,7 +1929,7 @@ void ChatWindow::saveState() const
}
bool ChatWindow::saveTab(const int num,
- const ChatTab *const tab) const
+ const ChatTab *const tab)
{
if (tab == nullptr)
return false;
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 654ec2357..8e3a3cec0 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -238,8 +238,8 @@ class ChatWindow final : public Window,
void saveState() const;
- bool saveTab(const int num,
- const ChatTab *const tab) const;
+ static bool saveTab(const int num,
+ const ChatTab *const tab);
void loadCustomList();
diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h
index 6b77696cf..90088dc34 100644
--- a/src/gui/windows/mailwindow.h
+++ b/src/gui/windows/mailwindow.h
@@ -68,7 +68,7 @@ class MailWindow final : public Window,
void postConnection();
- void createMail(const std::string &to);
+ static void createMail(const std::string &to);
MailMessage *findMail(const int64_t id) A_WARN_UNUSED;
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index d0e891d91..7f03593eb 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -264,9 +264,9 @@ class NpcDialog final : public Window,
void deleteSkinControls();
- void restoreVirtuals();
+ static void restoreVirtuals();
- std::string complexItemToStr(const ComplexItem *const item);
+ static std::string complexItemToStr(const ComplexItem *const item);
BeingId mNpcId;
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 575d07088..4546c70b6 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -217,8 +217,8 @@ class SkillDialog final : public Window,
SkillInfo *loadSkill(XmlNodeConstPtr node,
SkillModel *const model);
- void loadSkillData(XmlNodeConstPtr node,
- SkillInfo *const skill);
+ static void loadSkillData(XmlNodeConstPtr node,
+ SkillInfo *const skill);
void addDefaultTab();
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 1cb5281a9..b470b66ac 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -1061,7 +1061,6 @@ InputActionT InputManager::getActionByKey(const SDL_Event &restrict event)
}
InputActionT InputManager::getActionByConfigField(const std::string &field)
- const restrict2
{
for (int i = 0; i < CAST_S32(InputAction::TOTAL); i ++)
{
@@ -1073,7 +1072,6 @@ InputActionT InputManager::getActionByConfigField(const std::string &field)
}
void InputManager::addChatCommands(std::list<std::string> &restrict arr)
- restrict
{
const int sz = CAST_S32(InputAction::TOTAL);
for (int i = 0; i < sz; i++)
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h
index dfbe8639a..f1eda8aae 100644
--- a/src/input/inputmanager.h
+++ b/src/input/inputmanager.h
@@ -143,8 +143,7 @@ class InputManager final
InputActionT getActionByKey(const SDL_Event &restrict event)
const restrict2 A_WARN_UNUSED;
- InputActionT getActionByConfigField(const std::string &field)
- const restrict2 A_WARN_UNUSED;
+ static InputActionT getActionByConfigField(const std::string &field);
void executeAction(const InputActionT keyNum) restrict2;
@@ -160,7 +159,7 @@ class InputManager final
const std::string &restrict args,
ChatTab *restrict const tab) restrict2;
- void addChatCommands(std::list<std::string> &restrict arr) restrict;
+ static void addChatCommands(std::list<std::string> &restrict arr);
protected:
void resetKey(const InputActionT i) restrict2;
diff --git a/src/particle/particleemitter.h b/src/particle/particleemitter.h
index 72e033506..822ce1dcf 100644
--- a/src/particle/particleemitter.h
+++ b/src/particle/particleemitter.h
@@ -88,7 +88,7 @@ class ParticleEmitter final
template <typename T> static ParticleEmitterProp<T>
readParticleEmitterProp(XmlNodePtrConst propertyNode, T def);
- ImageSet *getImageSet(XmlNodePtrConst node);
+ static ImageSet *getImageSet(XmlNodePtrConst node);
/**
* initial position of particles:
diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp
index 1ee24f33d..628e43b6a 100644
--- a/src/particle/particleengine.cpp
+++ b/src/particle/particleengine.cpp
@@ -64,7 +64,7 @@ ParticleEngine::~ParticleEngine()
ParticleEngine::particleCount--;
}
-void ParticleEngine::setupEngine() restrict2
+void ParticleEngine::setupEngine()
{
ParticleEngine::maxCount = config.getIntValue("particleMaxCount");
ParticleEngine::fastPhysics = fromInt(config.getIntValue(
diff --git a/src/particle/particleengine.h b/src/particle/particleengine.h
index a0315d481..5020a5ffa 100644
--- a/src/particle/particleengine.h
+++ b/src/particle/particleengine.h
@@ -73,7 +73,7 @@ class ParticleEngine final
* Gives a particle the properties of an engine root particle and loads
* the particle-related config settings.
*/
- void setupEngine() restrict2;
+ static void setupEngine();
/**
* Updates particle position, returns false when the particle should
diff --git a/src/progs/manaplus/client.h b/src/progs/manaplus/client.h
index 95725c5fd..26152270d 100644
--- a/src/progs/manaplus/client.h
+++ b/src/progs/manaplus/client.h
@@ -119,7 +119,7 @@ class Client final : public ConfigListener,
static void logVars();
#endif // ANDROID
- void stateConnectGame1();
+ static void stateConnectGame1();
void stateConnectServer1();
diff --git a/src/resources/memorymanager.h b/src/resources/memorymanager.h
index 8dbf11b7f..3abceb6ce 100644
--- a/src/resources/memorymanager.h
+++ b/src/resources/memorymanager.h
@@ -39,14 +39,14 @@ class MemoryManager final
~MemoryManager()
{ }
- int getSurfaceSize(const SDL_Surface *const surface);
+ static int getSurfaceSize(const SDL_Surface *const surface);
- void printMemory(const std::string &name,
- const int level,
- const int localSum,
- const int childsSum);
+ static void printMemory(const std::string &name,
+ const int level,
+ const int localSum,
+ const int childsSum);
- void printAllMemory(ChatTab *const tab);
+ static void printAllMemory(ChatTab *const tab);
};
extern MemoryManager memoryManager;
diff --git a/src/resources/sdlimagehelper.h b/src/resources/sdlimagehelper.h
index 77f6d3941..63089966c 100644
--- a/src/resources/sdlimagehelper.h
+++ b/src/resources/sdlimagehelper.h
@@ -94,7 +94,7 @@ class SDLImageHelper final : public ImageHelper
protected:
/** SDL_Surface to SDL_Surface Image loader */
- Image *_SDLload(SDL_Surface *tmpImage) A_WARN_UNUSED;
+ static Image *_SDLload(SDL_Surface *tmpImage);
static bool mEnableAlphaCache;
};