summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.h
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-08-26 22:50:06 +0200
committerRaphael Langella <raphael.langella@gmail.com>2012-08-26 23:06:30 +0200
commit770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch)
treee030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/shopping.h
parenta6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff)
downloadcrawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.tar.gz
crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.zip
Use std namespace.
I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
Diffstat (limited to 'crawl-ref/source/shopping.h')
-rw-r--r--crawl-ref/source/shopping.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/crawl-ref/source/shopping.h b/crawl-ref/source/shopping.h
index a40eb5c8c0..cf1fe53ef5 100644
--- a/crawl-ref/source/shopping.h
+++ b/crawl-ref/source/shopping.h
@@ -25,8 +25,8 @@ shop_struct *get_shop(const coord_def& where);
void destroy_shop_at(coord_def p);
-std::string shop_name(const coord_def& where);
-std::string shop_name(const coord_def& where, bool add_stop);
+string shop_name(const coord_def& where);
+string shop_name(const coord_def& where, bool add_stop);
bool shoptype_identifies_stock(shop_type type);
@@ -44,14 +44,14 @@ public:
bool add_thing(const item_def &item, int cost,
const level_pos* pos = NULL);
- bool add_thing(std::string desc, std::string buy_verb, int cost,
+ bool add_thing(string desc, string buy_verb, int cost,
const level_pos* pos = NULL);
bool is_on_list(const item_def &item, const level_pos* pos = NULL) const;
- bool is_on_list(std::string desc, const level_pos* pos = NULL) const;
+ bool is_on_list(string desc, const level_pos* pos = NULL) const;
bool del_thing(const item_def &item, const level_pos* pos = NULL);
- bool del_thing(std::string desc, const level_pos* pos = NULL);
+ bool del_thing(string desc, const level_pos* pos = NULL);
void del_things_from(const level_id &lid);
@@ -82,24 +82,23 @@ private:
private:
int find_thing(const item_def &item, const level_pos &pos) const;
- int find_thing(const std::string &desc, const level_pos &pos) const;
+ int find_thing(const string &desc, const level_pos &pos) const;
void del_thing_at_index(int idx);
void fill_out_menu(Menu& shopmenu);
static bool thing_is_item(const CrawlHashTable& thing);
static const item_def& get_thing_item(const CrawlHashTable& thing);
- static std::string get_thing_desc(const CrawlHashTable& thing);
+ static string get_thing_desc(const CrawlHashTable& thing);
static int thing_cost(const CrawlHashTable& thing);
static level_pos thing_pos(const CrawlHashTable& thing);
- static std::string name_thing(const CrawlHashTable& thing,
- description_level_type descrip = DESC_PLAIN);
- static std::string describe_thing(const CrawlHashTable& thing,
- description_level_type descrip = DESC_PLAIN);
- static std::string item_name_simple(const item_def& item,
- bool ident = false);
+ static string name_thing(const CrawlHashTable& thing,
+ description_level_type descrip = DESC_PLAIN);
+ static string describe_thing(const CrawlHashTable& thing,
+ description_level_type descrip = DESC_PLAIN);
+ static string item_name_simple(const item_def& item, bool ident = false);
};
extern ShoppingList shopping_list;