diff options
author | blackcustard <peterwicksstringfield@gmail.com> | 2013-11-18 13:52:22 -0600 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-11-22 00:17:45 -0500 |
commit | 8a45347cdd9b6786c898b2a4c5e1cfdd3fd251a3 (patch) | |
tree | eda2e14d8b1b59921e6f974c255dc3778af8677a /crawl-ref/source/spl-goditem.cc | |
parent | 846501a2c22839bb8d447db502d5ae7a7e1361f7 (diff) | |
download | crawl-ref-8a45347cdd9b6786c898b2a4c5e1cfdd3fd251a3.tar.gz crawl-ref-8a45347cdd9b6786c898b2a4c5e1cfdd3fd251a3.zip |
Fix an old and harmless mistake.
There is no point in testing the same conditional three times. This
weirdness appears to be an artefact of an earlier change: no one noticed
that the loop body had become independent of the loop index.
Diffstat (limited to 'crawl-ref/source/spl-goditem.cc')
-rw-r--r-- | crawl-ref/source/spl-goditem.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-goditem.cc b/crawl-ref/source/spl-goditem.cc index a566f67ff3..595d1b87a2 100644 --- a/crawl-ref/source/spl-goditem.cc +++ b/crawl-ref/source/spl-goditem.cc @@ -829,14 +829,11 @@ static bool _do_imprison(int pow, const coord_def& where, bool zin) // Make sure we have a legitimate tile. proceed = false; - for (unsigned int i = 0; i < ARRAYSZ(safe_tiles) && !proceed; ++i) + if (cell_is_solid(*ai) && !feat_is_opaque(grd(*ai))) { - if (cell_is_solid(*ai) && !feat_is_opaque(grd(*ai))) - { - success = false; - none_vis = false; - break; - } + success = false; + none_vis = false; + break; } } |