remove string argument in assert - DiffEngine
This commit is contained in:
parent
d3b71b9db3
commit
fc55d0b2e6
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue