summaryrefslogtreecommitdiff
path: root/src/map/storage.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-16 17:47:51 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-24 10:02:00 -0800
commitb52127bcbf817ff8285b36d22198b275327e16bb (patch)
tree7bc596289c011e719168bef846b8cf63bf5d4947 /src/map/storage.cpp
parent4bd7eeec09629d3c0f900d42c899fe23c69e07b6 (diff)
downloadtmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.gz
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.bz2
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.xz
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.zip
Cleanup headers and remove all uses of va_list except logging
Diffstat (limited to 'src/map/storage.cpp')
-rw-r--r--src/map/storage.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/map/storage.cpp b/src/map/storage.cpp
index 6426cb1..09b8893 100644
--- a/src/map/storage.cpp
+++ b/src/map/storage.cpp
@@ -1,23 +1,25 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "storage.hpp"
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "../common/db.hpp"
#include "../common/nullpo.hpp"
-#include "storage.hpp"
+#include "atcommand.hpp"
+#include "battle.hpp"
#include "chrif.hpp"
-#include "itemdb.hpp"
#include "clif.hpp"
#include "intif.hpp"
+#include "itemdb.hpp"
#include "pc.hpp"
-#include "battle.hpp"
-#include "atcommand.hpp"
-static struct dbt *storage_db;
+static
+struct dbt *storage_db;
/*==========================================
* 倉庫内アイテムソート
@@ -37,7 +39,8 @@ int storage_comp_item(const void *_i1, const void *_i2)
return i1->nameid - i2->nameid;
}
-static void storage_db_final(db_key_t key, db_val_t data, va_list ap)
+static
+void storage_db_final(db_key_t, db_val_t data)
{
struct storage *stor = (struct storage *) data;
free(stor);
@@ -66,7 +69,8 @@ void do_final_storage(void) // by [MC Cameri]
numdb_final(storage_db, storage_db_final);
}
-static void storage_reconnect_sub(db_key_t key, db_val_t data, va_list ap)
+static
+void storage_reconnect_sub(db_key_t, db_val_t data)
{
//Parses storage and saves 'dirty' ones upon reconnect. [Skotlex]
struct storage *stor = (struct storage *) data;
@@ -146,7 +150,8 @@ int storage_storageopen(struct map_session_data *sd)
* Internal add-item function.
*------------------------------------------
*/
-static int storage_additem(struct map_session_data *sd, struct storage *stor,
+static
+int storage_additem(struct map_session_data *sd, struct storage *stor,
struct item *item_data, int amount)
{
struct item_data *data;
@@ -191,7 +196,8 @@ static int storage_additem(struct map_session_data *sd, struct storage *stor,
* Internal del-item function
*------------------------------------------
*/
-static int storage_delitem(struct map_session_data *sd, struct storage *stor,
+static
+int storage_delitem(struct map_session_data *sd, struct storage *stor,
int n, int amount)
{
@@ -438,4 +444,4 @@ int storage_storage_saved(int account_id)
return 1;
}
return 0;
-} \ No newline at end of file
+}