summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 00:32:53 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 16:41:47 +0200
commit4e27937924766948d7ff9200f04a37fe4d59018c (patch)
treec1f5c255192c85a82c77c2f8f916984e2b863c44 /src/net/tmwa/inventoryhandler.cpp
parentc2eab288ecc7d7c5e26d02ccecf285cbc0c218ed (diff)
downloadmana-client-4e27937924766948d7ff9200f04a37fe4d59018c.tar.gz
mana-client-4e27937924766948d7ff9200f04a37fe4d59018c.tar.bz2
mana-client-4e27937924766948d7ff9200f04a37fe4d59018c.tar.xz
mana-client-4e27937924766948d7ff9200f04a37fe4d59018c.zip
Arbitrary code cleanups
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index edb5e53f..48f40e11 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -49,7 +49,7 @@ extern Net::InventoryHandler *inventoryHandler;
namespace TmwAthena {
-const EquipmentSlot EQUIP_POINTS[EQUIP_VECTOR_END] = {
+static const EquipmentSlot EQUIP_POINTS[EQUIP_VECTOR_END] = {
EQUIP_LEGS_SLOT,
EQUIP_FIGHT1_SLOT,
EQUIP_ARMS_SLOT,
@@ -60,9 +60,10 @@ const EquipmentSlot EQUIP_POINTS[EQUIP_VECTOR_END] = {
EQUIP_NECKLACE_SLOT,
EQUIP_HEAD_SLOT,
EQUIP_TORSO_SLOT,
- EQUIP_PROJECTILE_SLOT};
+ EQUIP_PROJECTILE_SLOT
+};
-int getSlot(int eAthenaSlot)
+static int getSlot(int eAthenaSlot)
{
if (eAthenaSlot == 0)
{