diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 22:50:06 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 23:06:30 +0200 |
commit | 770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch) | |
tree | e030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/items.h | |
parent | a6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff) | |
download | crawl-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/items.h')
-rw-r--r-- | crawl-ref/source/items.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crawl-ref/source/items.h b/crawl-ref/source/items.h index 733e1cc75d..2912a52a66 100644 --- a/crawl-ref/source/items.h +++ b/crawl-ref/source/items.h @@ -75,13 +75,13 @@ void pickup_menu(int item_link); void pickup(bool partial_quantity = false); bool item_is_branded(const item_def& item); -void item_list_on_square(std::vector<const item_def*>& items, - int obj, bool force_squelch = false); +void item_list_on_square(vector<const item_def*>& items, + int obj, bool force_squelch = false); bool copy_item_to_grid(const item_def &item, const coord_def& p, - int quant_drop = -1, // item.quantity by default - bool mark_dropped = false, - bool silent = false); + int quant_drop = -1, // item.quantity by default + bool mark_dropped = false, + bool silent = false); coord_def item_pos(const item_def &item); bool move_top_item(const coord_def &src, const coord_def &dest); @@ -112,7 +112,7 @@ void origin_set(const coord_def& where); void origin_set_monster(item_def &item, const monster* mons); bool origin_known(const item_def &item); bool origin_describable(const item_def &item); -std::string origin_desc(const item_def &item); +string origin_desc(const item_def &item); void origin_purchased(item_def &item); void origin_acquired(item_def &item, int agent); void origin_set_startequip(item_def &item); @@ -156,8 +156,7 @@ coord_def orb_position(); // stack_iterator guarantees validity so long as you don't manually // mess with item_def.link: i.e., you can kill the item you're // examining but you can't kill the item linked to it. -class stack_iterator : public std::iterator<std::forward_iterator_tag, - item_def> +class stack_iterator : public iterator<forward_iterator_tag, item_def> { public: explicit stack_iterator(const coord_def& pos, bool accessible = false); |