All pastes #25153 Raw Edit

Unnamed

public cpp v1 · immutable
#25153 ·published 2005-10-10 18:58 UTC
rendered paste body
void Vector::SetLength (int n){    count = n;    SetLimit (n);}void Vector::SetLimit (int n){    if ((n > limit) || ((limit > threshold) && (n < limit - threshold)))    {        n = ((n + threshold - 1) / threshold) * threshold;        if (n)            root = (Some *)realloc (root, n * sizeof (Some));        else        {            free (root);            root = NULL;        }        limit = n;    }}