summaryrefslogtreecommitdiff
path: root/src/playerinfo.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/playerinfo.cpp
parentc2eab288ecc7d7c5e26d02ccecf285cbc0c218ed (diff)
downloadmana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.gz
mana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.bz2
mana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.xz
mana-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/playerinfo.cpp')
-rw-r--r--src/playerinfo.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index feb39413..6fd4a71a 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -33,25 +33,23 @@ namespace PlayerInfo {
class PlayerLogic;
-PlayerLogic *mListener = 0;
+static PlayerLogic *mListener = 0;
-PlayerInfoBackend mData;
+static PlayerInfoBackend mData;
-Inventory *mInventory = 0;
-Equipment *mEquipment = 0;
+static Inventory *mInventory = 0;
+static Equipment *mEquipment = 0;
-bool mStorageCount = 0;
+static bool mStorageCount = 0;
-bool mNPCCount = 0;
-bool mNPCPostCount = 0;
+static bool mNPCCount = 0;
+static bool mNPCPostCount = 0;
-BuySellState mBuySellState = BUYSELL_NONE;
-bool mTrading = false;
+static BuySellState mBuySellState = BUYSELL_NONE;
+static bool mTrading = false;
-std::map<int, Special> mSpecials;
-char mSpecialRechargeUpdateNeeded = 0;
-
-int mLevelProgress = 0;
+static std::map<int, Special> mSpecials;
+static char mSpecialRechargeUpdateNeeded = 0;
// --- Triggers ---------------------------------------------------------------