mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Bits optimized, CtrlLib: ArrayCtrl::WhenColumnSort
git-svn-id: svn://ultimatepp.org/upp/trunk@11029 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
647b4ee789
commit
ce7186cd36
6 changed files with 36 additions and 30 deletions
|
|
@ -83,4 +83,26 @@ thread__ int invector_cache_blki_;
|
|||
thread__ int invector_cache_offset_;
|
||||
thread__ int invector_cache_end_;
|
||||
|
||||
|
||||
void Bits::Clear()
|
||||
{
|
||||
if(bp)
|
||||
delete[] bp;
|
||||
alloc = 0;
|
||||
bp = NULL;
|
||||
}
|
||||
|
||||
void Bits::Expand(int q)
|
||||
{
|
||||
int nalloc = 4 * q / 3 + 1;
|
||||
dword *nbp = new dword[nalloc];
|
||||
if(bp) {
|
||||
Copy(nbp, bp, bp + alloc);
|
||||
delete[] bp;
|
||||
}
|
||||
Fill(nbp + alloc, nbp + nalloc, (dword)0);
|
||||
bp = nbp;
|
||||
alloc = nalloc;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue