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;
|
$i = 0;
|
||||||
$j = 0;
|
$j = 0;
|
||||||
|
|
||||||
USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
|
USE_ASSERTS && assert(sizeof($lines) == sizeof($changed));
|
||||||
$len = sizeof($lines);
|
$len = sizeof($lines);
|
||||||
$other_len = sizeof($other_changed);
|
$other_len = sizeof($other_changed);
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ class _DiffEngine
|
|||||||
$j++;
|
$j++;
|
||||||
|
|
||||||
while ($i < $len && ! $changed[$i]) {
|
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++;
|
$i++; $j++;
|
||||||
while ($j < $other_len && $other_changed[$j])
|
while ($j < $other_len && $other_changed[$j])
|
||||||
$j++;
|
$j++;
|
||||||
@ -465,10 +465,10 @@ class _DiffEngine
|
|||||||
$changed[--$i] = false;
|
$changed[--$i] = false;
|
||||||
while ($start > 0 && $changed[$start - 1])
|
while ($start > 0 && $changed[$start - 1])
|
||||||
$start--;
|
$start--;
|
||||||
USE_ASSERTS && assert('$j > 0');
|
USE_ASSERTS && assert($j > 0);
|
||||||
while ($other_changed[--$j])
|
while ($other_changed[--$j])
|
||||||
continue;
|
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])
|
while ($i < $len && $changed[$i])
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
|
USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]);
|
||||||
$j++;
|
$j++;
|
||||||
if ($j < $other_len && $other_changed[$j]) {
|
if ($j < $other_len && $other_changed[$j]) {
|
||||||
$corresponding = $i;
|
$corresponding = $i;
|
||||||
@ -508,10 +508,10 @@ class _DiffEngine
|
|||||||
while ($corresponding < $i) {
|
while ($corresponding < $i) {
|
||||||
$changed[--$start] = 1;
|
$changed[--$start] = 1;
|
||||||
$changed[--$i] = 0;
|
$changed[--$i] = 0;
|
||||||
USE_ASSERTS && assert('$j > 0');
|
USE_ASSERTS && assert($j > 0);
|
||||||
while ($other_changed[--$j])
|
while ($other_changed[--$j])
|
||||||
continue;
|
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