diff options
author | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-23 06:27:58 +0000 |
---|---|---|
committer | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-23 06:27:58 +0000 |
commit | 922cba628d3d6377574a90c7a817c10d84ed7f85 (patch) | |
tree | ae983cf4a6d1e2dc85fd5c58754f2ec06d25afae /crawl-ref/source/stash.h | |
parent | 7c2f45cfd1fed2a890780bdf2b7e3d1cd105dfb5 (diff) | |
download | crawl-ref-922cba628d3d6377574a90c7a817c10d84ed7f85.tar.gz crawl-ref-922cba628d3d6377574a90c7a817c10d84ed7f85.zip |
"stashes" was both a global variable and a member variable... confusing!
Renamed both of them.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3827 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stash.h')
-rw-r--r-- | crawl-ref/source/stash.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h index c46534ebf3..6102f013fd 100644 --- a/crawl-ref/source/stash.h +++ b/crawl-ref/source/stash.h @@ -239,21 +239,22 @@ public: std::string level_name() const; std::string short_level_name() const; - int stash_count() const { return stashes.size() + shops.size(); } - int visible_stash_count() const { return count_stashes() + shops.size(); } + int stash_count() const { return m_stashes.size() + m_shops.size(); } + int visible_stash_count() const { return _num_enabled_stashes() + m_shops.size(); } bool is_current() const; -private: - // which level - level_id place; + private: + int _num_enabled_stashes() const; + + private: typedef std::map<int, Stash> stashes_t; typedef std::vector<ShopInfo> shops_t; - stashes_t stashes; - shops_t shops; - - int count_stashes() const; + // which level + level_id m_place; + stashes_t m_stashes; + shops_t m_shops; }; extern std::ostream &operator << (std::ostream &, const LevelStashes &); @@ -326,7 +327,7 @@ private: stash_levels_t levels; }; -extern StashTracker stashes; +extern StashTracker StashTrack; bool is_stash(int x, int y); void describe_stash(int x, int y); |