From fc55d0b2e6b8eb4249d184d2b332f6771347bdfd Mon Sep 17 00:00:00 2001 From: Phy <git@phy25.com> Date: Wed, 27 Dec 2017 07:14:10 +0800 Subject: [PATCH] remove string argument in assert - DiffEngine --- inc/DifferenceEngine.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 3c873d8d3..70877a4f2 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -408,7 +408,7 @@ class _DiffEngine { $i = 0; $j = 0; - USE_ASSERTS && assert('count($lines) == count($changed)'); + USE_ASSERTS && assert(count($lines) == count($changed)); $len = count($lines); $other_len = count($other_changed); @@ -428,7 +428,7 @@ class _DiffEngine { $j++; while ($i < $len && ! $changed[$i]) { - USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]'); + USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]); $i++; $j++; while ($j < $other_len && $other_changed[$j]) @@ -461,10 +461,10 @@ class _DiffEngine { $changed[--$i] = false; while ($start > 0 && $changed[$start - 1]) $start--; - USE_ASSERTS && assert('$j > 0'); + USE_ASSERTS && assert($j > 0); while ($other_changed[--$j]) continue; - USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]'); + USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]); } /* @@ -487,7 +487,7 @@ class _DiffEngine { while ($i < $len && $changed[$i]) $i++; - USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]'); + USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]); $j++; if ($j < $other_len && $other_changed[$j]) { $corresponding = $i; @@ -504,10 +504,10 @@ class _DiffEngine { while ($corresponding < $i) { $changed[--$start] = 1; $changed[--$i] = 0; - USE_ASSERTS && assert('$j > 0'); + USE_ASSERTS && assert($j > 0); while ($other_changed[--$j]) continue; - USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]'); + USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]); } } } -- GitLab