From 922cba628d3d6377574a90c7a817c10d84ed7f85 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Sun, 23 Mar 2008 06:27:58 +0000 Subject: "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 --- crawl-ref/source/stash.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/stash.h') 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 stashes_t; typedef std::vector 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); -- cgit v1.2.3-54-g00ecf