summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
commit84e56a88817f7178b4895e2adf863b4d98b42e64 (patch)
tree794e0099ca9f749fb0b6b65b96acdb7ce5e97ef9 /src/client.h
parent4a21e45a63137009a654a212ea7512ecc2846648 (diff)
downloadmv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.gz
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.bz2
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.xz
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.zip
Add const to other classes.
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/client.h b/src/client.h
index 3bfd68fa5..82a5a3983 100644
--- a/src/client.h
+++ b/src/client.h
@@ -74,9 +74,9 @@ extern LoginData loginData;
/**
* Returns elapsed time. (Warning: supposes the delay is always < 100 seconds)
*/
-int get_elapsed_time(int startTime);
+int get_elapsed_time(const int startTime);
-int get_elapsed_time1(int startTime);
+int get_elapsed_time1(const int startTime);
/**
* All client states.
@@ -213,9 +213,9 @@ public:
int gameExec();
- int testsExec();
+ int testsExec() const;
- static void setState(State state)
+ static void setState(const State state)
{ instance()->mState = state; }
static State getState()
@@ -245,19 +245,19 @@ public:
static bool getIsMinimized()
{ return instance()->mIsMinimized; }
- static void setIsMinimized(bool n)
+ static void setIsMinimized(const bool n)
{ instance()->mIsMinimized = n; }
static bool getInputFocused()
{ return instance()->mInputFocused; }
- static void setInputFocused(bool n)
+ static void setInputFocused(const bool n)
{ instance()->mInputFocused = n; }
static bool getMouseFocused()
{ return instance()->mMouseFocused; }
- static void setMouseFocused(bool n)
+ static void setMouseFocused(const bool n)
{ instance()->mMouseFocused = n; }
static std::string getUpdatesDir()
@@ -266,7 +266,8 @@ public:
static std::string getServerName()
{ return instance()->mServerName; }
- static void resize(int width, int height, bool always = false)
+ static void resize(const int width, const int height,
+ const bool always = false)
{ instance()->resizeVideo(width, height, always); }
static void setGuiAlpha(float n);
@@ -275,7 +276,7 @@ public:
static void closeDialogs();
- static void setFramerate(int fpsLimit);
+ static void setFramerate(const int fpsLimit);
static int getFramerate();
@@ -283,29 +284,29 @@ public:
static void applyGrabMode();
- void applyGamma();
+ static void applyGamma();
- void applyVSync();
+ static void applyVSync();
- void applyKeyRepeat();
+ static void applyKeyRepeat();
void optionChanged(const std::string &name);
void action(const gcn::ActionEvent &event);
- void initTradeFilter();
+ void initTradeFilter() const;
void initUsersDir();
void initPacketLimiter();
- void writePacketLimits(std::string packetLimitsName);
+ void writePacketLimits(std::string packetLimitsName) const;
- void resizeVideo(int width, int height, bool always);
+ void resizeVideo(int width, int height, const bool always);
- static bool limitPackets(int type);
+ static bool limitPackets(const int type);
- static bool checkPackets(int type);
+ static bool checkPackets(const int type);
PacketLimit mPacketLimits[PACKET_SIZE + 1];
@@ -314,7 +315,7 @@ private:
void initHomeDir();
- void initConfiguration();
+ void initConfiguration() const;
void initLocalDataDir();
@@ -328,13 +329,14 @@ private:
void initServerConfig(std::string serverName);
- bool copyFile(std::string &configPath, std::string &oldConfigPath);
+ bool copyFile(const std::string &configPath,
+ const std::string &oldConfigPath) const;
bool createConfig(std::string &configPath);
- void accountLogin(LoginData *data);
+ void accountLogin(LoginData *const data) const;
- void storeSafeParameters();
+ void storeSafeParameters() const;
void gameClear();