summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.cc
diff options
context:
space:
mode:
authorBrendan Hickey <brendan@bhickey.net>2013-04-28 23:26:25 -0700
committerBrendan Hickey <brendan@bhickey.net>2013-04-28 23:54:23 -0700
commit23222fdd521c999d61b2cbdee7fe4d87a234cf8c (patch)
treeb23dd3877fd266625ceb389873a9bd94d7379951 /crawl-ref/source/los.cc
parent926959ac5bd809f4014e5ad2f47bbe778e5760e8 (diff)
downloadcrawl-ref-23222fdd521c999d61b2cbdee7fe4d87a234cf8c.tar.gz
crawl-ref-23222fdd521c999d61b2cbdee7fe4d87a234cf8c.zip
Refactor ASSERT(a && b) -> ASSERT(a); ASSERT(b);
Convert conjunctive assertions into separate assertions. This ought to be correctness preserving. I ran the stress tests and didn't notice anything unusual. While I have confidence in it, if you are the slightest bit suspicious of this, please roll it back. Found instances with `ASSERT(\([^(|]*\) && \([^)|]*\))` Manually inspected each instance.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r--crawl-ref/source/los.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index d82a53f179..42275c3aaf 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -256,7 +256,8 @@ static bool _is_better(const cellray& a, const cellray& b)
// Only compare cellrays with equal target.
ASSERT(a.target() == b.target());
// calc_params() has been called.
- ASSERT(a.imbalance >= 0 && b.imbalance >= 0);
+ ASSERT(a.imbalance >= 0);
+ ASSERT(b.imbalance >= 0);
if (a.imbalance < b.imbalance)
return true;
else if (a.imbalance > b.imbalance)
@@ -561,7 +562,8 @@ static bool _find_ray_se(const coord_def& target, ray_def& ray,
const opacity_func& opc, const circle_def& bds,
bool cycle)
{
- ASSERT(target.x >= 0 && target.y >= 0 && !target.origin());
+ ASSERT(target.x >= 0 && target.y >= 0);
+ ASSERT(!target.origin());
if (!bds.contains(target))
return false;