summaryrefslogtreecommitdiff
path: root/src/common/mapindex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mapindex.c')
-rw-r--r--src/common/mapindex.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 37afcad3d..36bd32cb5 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -64,7 +64,8 @@ int mapindex_addmap(int index, const char *name)
return 1;
}
-unsigned short mapindex_name2id(const char* name) {
+unsigned short mapindex_name2id(const char* name)
+{
//TODO: Perhaps use a db to speed this up? [Skotlex]
int i;
char map_name[MAP_NAME_LENGTH_EXT];
@@ -91,7 +92,8 @@ unsigned short mapindex_name2id(const char* name) {
#endif
}
-const char* mapindex_id2name(unsigned short id) {
+const char* mapindex_id2name(unsigned short id)
+{
if (id > MAX_MAPINDEX || !indexes[id].exists) {
ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", id);
return indexes[0].name; //Theorically this should never happen, hence we return this string to prevent null pointer crashes.
@@ -99,7 +101,8 @@ const char* mapindex_id2name(unsigned short id) {
return indexes[id].name;
}
-void mapindex_init(void) {
+void mapindex_init(void)
+{
FILE *fp;
char line[1024];
int last_index = -1;
@@ -130,5 +133,6 @@ void mapindex_init(void) {
fclose(fp);
}
-void mapindex_final(void) {
+void mapindex_final(void)
+{
}