summaryrefslogtreecommitdiff
path: root/src/serverlist.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-06-20 00:59:39 -0400
committerShadowNinja <shadowninja@minetest.net>2014-06-30 13:26:02 -0400
commit9afeb97fc693a769f2d9dad4aad6ddbdef285a71 (patch)
treef0dc22fe37f35cd30879a580ee7d8f1e1d02d2bf /src/serverlist.h
parentb4c2e79ea49fb7d2c2ac673c00454070462ef1ad (diff)
downloadminetest-9afeb97fc693a769f2d9dad4aad6ddbdef285a71.tar.gz
minetest-9afeb97fc693a769f2d9dad4aad6ddbdef285a71.tar.bz2
minetest-9afeb97fc693a769f2d9dad4aad6ddbdef285a71.zip
Fix serverlist code style, const-correctness, and types
Diffstat (limited to 'src/serverlist.h')
-rw-r--r--src/serverlist.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/serverlist.h b/src/serverlist.h
index bc40a1b39..aa3f1d610 100644
--- a/src/serverlist.h
+++ b/src/serverlist.h
@@ -31,17 +31,19 @@ namespace ServerList
{
std::vector<ServerListSpec> getLocal();
std::vector<ServerListSpec> getOnline();
- bool deleteEntry(ServerListSpec server);
- bool insert(ServerListSpec server);
- std::vector<ServerListSpec> deSerialize(std::string liststring);
- std::string serialize(std::vector<ServerListSpec>);
- std::vector<ServerListSpec> deSerializeJson(std::string liststring);
- std::string serializeJson(std::vector<ServerListSpec>);
+ bool deleteEntry(const ServerListSpec &server);
+ bool insert(const ServerListSpec &server);
+ std::vector<ServerListSpec> deSerialize(const std::string &liststring);
+ const std::string serialize(const std::vector<ServerListSpec> &serverlist);
+ std::vector<ServerListSpec> deSerializeJson(const std::string &liststring);
+ const std::string serializeJson(const std::vector<ServerListSpec> &serverlist);
#if USE_CURL
- void sendAnnounce(std::string action = "", const std::vector<std::string> & clients_names = std::vector<std::string>(),
- double uptime = 0, u32 game_time = 0, float lag = 0, std::string gameid = "",
- std::vector<ModSpec> mods = std::vector<ModSpec>());
+ void sendAnnounce(const std::string &action,
+ const std::vector<std::string> &clients_names = std::vector<std::string>(),
+ const double uptime = 0, const u32 game_time = 0,
+ const float lag = 0, const std::string &gameid = "",
+ const std::vector<ModSpec> &mods = std::vector<ModSpec>());
#endif
-} //ServerList namespace
+} // ServerList namespace
#endif