diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-08 03:56:17 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-08 03:56:17 +0000 |
commit | e28640bd80d810834b24c2759acf21c4115c9e23 (patch) | |
tree | 1e2e01c8763466335b211f488d2605fb5320cac3 /crawl-ref/source/stuff.cc | |
parent | 18ae724a6b0f9e662af6ed1d46caed583faa5cc4 (diff) | |
download | crawl-ref-e28640bd80d810834b24c2759acf21c4115c9e23.tar.gz crawl-ref-e28640bd80d810834b24c2759acf21c4115c9e23.zip |
Add still more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9382 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 02c4b2ff57..9d63b87843 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -275,9 +275,7 @@ bool radius_iterator::on_valid_square() const const radius_iterator& radius_iterator::operator++() { do - { this->step(); - } while (!this->done() && !this->on_valid_square()); return (*this); @@ -286,9 +284,7 @@ const radius_iterator& radius_iterator::operator++() const radius_iterator& radius_iterator::operator--() { do - { this->step_back(); - } while (!this->done() && !this->on_valid_square()); return (*this); @@ -1305,12 +1301,13 @@ unsigned char random_colour(void) unsigned char random_uncommon_colour() { unsigned char result; + do result = random_colour(); - while ( result == LIGHTCYAN || result == CYAN || result == BROWN ); - return result; -} + while (result == LIGHTCYAN || result == CYAN || result == BROWN); + return (result); +} // returns if a colour is one of the special element colours (ie not regular) bool is_element_colour( int col ) |