mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-25 14:30:32 +00:00
Rename Kept -> Suffix
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
06943add8b
commit
0c13998775
@ -34,14 +34,14 @@ struct ListReducer {
|
|||||||
unsigned MidTop = TheList.size();
|
unsigned MidTop = TheList.size();
|
||||||
while (MidTop > 1) {
|
while (MidTop > 1) {
|
||||||
unsigned Mid = MidTop / 2;
|
unsigned Mid = MidTop / 2;
|
||||||
std::vector<ElTy> Prefix(TheList.begin()+Mid, TheList.end());
|
std::vector<ElTy> Prefix(TheList.begin(), TheList.begin()+Mid);
|
||||||
std::vector<ElTy> Kept (TheList.begin(), TheList.begin()+Mid);
|
std::vector<ElTy> Suffix(TheList.begin()+Mid, TheList.end());
|
||||||
|
|
||||||
switch (doTest(Prefix, Kept)) {
|
switch (doTest(Prefix, Suffix)) {
|
||||||
case KeepSuffix:
|
case KeepSuffix:
|
||||||
// The property still holds. We can just drop the prefix elements, and
|
// The property still holds. We can just drop the prefix elements, and
|
||||||
// shorten the list to the "kept" elements.
|
// shorten the list to the "kept" elements.
|
||||||
TheList.swap(Kept);
|
TheList.swap(Suffix);
|
||||||
MidTop = TheList.size();
|
MidTop = TheList.size();
|
||||||
break;
|
break;
|
||||||
case KeepPrefix:
|
case KeepPrefix:
|
||||||
|
Loading…
Reference in New Issue
Block a user