Skip to content

Commit

Permalink
add an assert to test a code assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jul 24, 2014
1 parent ae58f71 commit 4deccbf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unit.cpp
Expand Up @@ -1987,6 +1987,7 @@ void unit::apply_modifications()

bool unit::invisible(const map_location& loc, bool see_all) const
{
assert(loc == get_location());
// This is a quick condition to check, and it does not depend on the
// location (so might as well bypass the location-based cache).
if ( get_state(STATE_UNCOVERED) )
Expand Down

0 comments on commit 4deccbf

Please sign in to comment.