diff options
author | Neil Moore <neil@s-z.org> | 2013-06-09 19:23:27 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-09 19:38:03 -0400 |
commit | a5badbaee5c2a35ea819e066787da97ad2f0648e (patch) | |
tree | 976c8c5e4298388a60b356a62b4f2db065693831 /crawl-ref/source/terrain.cc | |
parent | 5d961268d2138bd511a266b787977c805a2292f8 (diff) | |
download | crawl-ref-a5badbaee5c2a35ea819e066787da97ad2f0648e.tar.gz crawl-ref-a5badbaee5c2a35ea819e066787da97ad2f0648e.zip |
New mcros ASSERT_IN_BOUNDS{,_OR_ORIGIN}().
These print the out-of-bounds coordinate as part of the assertion
message.
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r-- | crawl-ref/source/terrain.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 54ecea895a..e7cc98e1da 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -1090,7 +1090,8 @@ static void _announce_swap(coord_def pos1, coord_def pos2) bool swap_features(const coord_def &pos1, const coord_def &pos2, bool swap_everything, bool announce) { - ASSERT(in_bounds(pos1) && in_bounds(pos2)); + ASSERT_IN_BOUNDS(pos1); + ASSERT_IN_BOUNDS(pos2); ASSERT(pos1 != pos2); if (is_sanctuary(pos1) || is_sanctuary(pos2)) @@ -1288,7 +1289,7 @@ static bool _ok_dest_cell(const actor* orig_actor, bool slide_feature_over(const coord_def &src, coord_def preferred_dest, bool announce) { - ASSERT(in_bounds(src)); + ASSERT_IN_BOUNDS(src); const dungeon_feature_type orig_feat = grd(src); const actor* orig_actor = actor_at(src); |