mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove usage of asserts with strings
This commit is contained in:
parent
9103816333
commit
e23fcda6b6
@ -413,7 +413,7 @@ class _DiffEngine
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
|
||||
USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
|
||||
USE_ASSERTS && assert(sizeof($lines) == sizeof($changed));
|
||||
$len = sizeof($lines);
|
||||
$other_len = sizeof($other_changed);
|
||||
|
||||
@ -433,7 +433,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])
|
||||
$j++;
|
||||
@ -465,10 +465,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]);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -491,7 +491,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;
|
||||
@ -508,10 +508,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
Block a user