diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
commit | 61cae4a761c2f72cda44ae269c7007b37a0c14a7 (patch) | |
tree | fec8ec71ca7ca6eebd9d48881bc5ee3fe27d04c1 /crawl-ref/source/invent.cc | |
parent | d4acdf4a6a4b73607d58714a66efd372674adb56 (diff) | |
download | crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.tar.gz crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.zip |
Misc. minor cleanups. (Yes, a huge amount of them but still...)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r-- | crawl-ref/source/invent.cc | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index fb0d215369..2ba2af30b1 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -417,14 +417,14 @@ bool InvMenu::is_selectable(int index) const { InvEntry *item = dynamic_cast<InvEntry*>(items[index]); if (item->is_item_cursed() && item->is_item_equipped()) - return false; + return (false); std::string text = item->get_text(); if (text.find("!*") != std::string::npos || text.find("!d") != std::string::npos) { - return false; + return (false); } } @@ -685,7 +685,7 @@ bool InvMenu::process_key( int key ) deselect_all(); sel.clear(); draw_select_count(0, true); - return true; + return (true); } return Menu::process_key( key ); } @@ -898,22 +898,21 @@ static bool _any_items_to_select(int selector) if (is_valid_item(you.inv[i]) && _is_item_selected(you.inv[i], selector)) { - return true; + return (true); } } - return false; + return (false); } -unsigned char invent_select( - const char *title, - menu_type type, - int item_selector, - int flags, - invtitle_annotator titlefn, - std::vector<SelItem> *items, - std::vector<text_pattern> *filter, - Menu::selitem_tfn selitemfn, - const std::vector<SelItem> *pre_select ) +unsigned char invent_select( const char *title, + menu_type type, + int item_selector, + int flags, + invtitle_annotator titlefn, + std::vector<SelItem> *items, + std::vector<text_pattern> *filter, + Menu::selitem_tfn selitemfn, + const std::vector<SelItem> *pre_select ) { InvMenu menu(flags); @@ -1252,7 +1251,7 @@ static std::string _operation_verb(operation_types oper) } } -// Return true if user OK'd it (or no warning), false otherwise. +// Returns true if user OK'd it (or no warning), false otherwise. bool check_warning_inscriptions( const item_def& item, operation_types oper ) { @@ -1458,7 +1457,7 @@ int prompt_invent_item( const char *prompt, bool prompt_failed(int retval, std::string msg) { if (retval != PROMPT_ABORT && retval != PROMPT_NOTHING) - return false; + return (false); if (msg.empty()) { @@ -1470,5 +1469,5 @@ bool prompt_failed(int retval, std::string msg) crawl_state.cancel_cmd_repeat(); - return true; + return (true); } |