diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
commit | c79403e1341ac533df1771b866d1f5cee15e12b5 (patch) | |
tree | 5bed6dfb44f7fce0432bd7a7a28d2d23db07ce80 /src/gui/serverdialog.h | |
parent | 7c79aa2b8e484319e3e511fa21db6d2448347024 (diff) | |
download | manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.gz manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.bz2 manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.xz manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r-- | src/gui/serverdialog.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index b6a45dfd9..d493a86b9 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -55,7 +55,8 @@ class ServersListModel : public gcn::ListModel public: typedef std::pair<int, std::string> VersionString; - ServersListModel(ServerInfos *servers, ServerDialog *parent); + ServersListModel(ServerInfos *const servers, + ServerDialog *const parent); /** * Used to get number of line in the list @@ -70,10 +71,10 @@ class ServersListModel : public gcn::ListModel /** * Used to get the corresponding Server struct */ - const ServerInfo &getServer(int elementIndex) const + const ServerInfo &getServer(const int elementIndex) const { return mServers->at(elementIndex); } - void setVersionString(int index, const std::string &version); + void setVersionString(const int index, const std::string &version); private: typedef std::vector<VersionString> VersionStrings; @@ -100,7 +101,7 @@ class ServerDialog : public Window, * * @see Window::Window */ - ServerDialog(ServerInfo *serverInfo, const std::string &dir); + ServerDialog(ServerInfo *const serverInfo, const std::string &dir); /** * Destructor @@ -123,7 +124,7 @@ class ServerDialog : public Window, void logic(); - void updateServer(ServerInfo server, int index); + void updateServer(ServerInfo server, const int index); void connectToSelectedServer(); @@ -141,14 +142,14 @@ class ServerDialog : public Window, */ void downloadServerList(); - void loadServers(bool addNew = true); + void loadServers(const bool addNew = true); void loadCustomServers(); void saveCustomServers(const ServerInfo ¤tServer = ServerInfo(), - int index = -1); + const int index = -1); - bool needUpdateServers(); + bool needUpdateServers() const; static int downloadUpdate(void *ptr, DownloadStatus status, size_t total, size_t remaining); |