Improve array KVO performance a bit
This commit is contained in:
parent
2f869541c7
commit
429a652eeb
|
@ -193,14 +193,7 @@ public:
|
|||
}
|
||||
else if (o->kind == kind) {
|
||||
if (kind == ColumnInfo::Kind::Remove) {
|
||||
// Shift the index to compensate for already-removed indices
|
||||
for (auto i : o->indices) {
|
||||
if (i <= index)
|
||||
++index;
|
||||
else
|
||||
break;
|
||||
}
|
||||
o->indices.add(index);
|
||||
o->indices.add_shifted(index);
|
||||
}
|
||||
else if (kind == ColumnInfo::Kind::Insert) {
|
||||
o->indices.insert_at(index);
|
||||
|
|
Loading…
Reference in New Issue