mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Fixed inefficiency in Vector::SetCountR (and thus in Vector::At)
git-svn-id: svn://ultimatepp.org/upp/trunk@1563 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
44dfbbb182
commit
feb49215a6
2 changed files with 1 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ void Vector<T>::SetCount(int n, const T& init) {
|
|||
template <class T>
|
||||
void Vector<T>::SetCountR(int n) {
|
||||
Chk();
|
||||
if(n + items > alloc)
|
||||
if(n > alloc)
|
||||
ReAllocF(alloc + ntl_max(alloc, n - items));
|
||||
SetCount(n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1755,7 +1755,6 @@ void ArrayCtrl::Add() {
|
|||
InvalidateCache(i);
|
||||
RefreshRow(i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ArrayCtrl::Add(const Vector<Value>& v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue