> Why not change the prototype for maxsize at the same time?

Unless you'd let me define  MathedArray::size_type as int (which I really
do not want either) this would mean a lot of changes in calling code that
is not cleaned up yet.

> | +   void need_size(int needed);
> 
> Can't this be private?

I think it will be removed again when we have proper 'insert' and 'erase'
functions for the MathedArray. I actually doubt that MathedArray will be
more than a _very_ thin wrapper around std::vector<byte> in the very end.

It is really just a temporary measure (as well as the 'int' positions) and
adding "nice things" (like proper access rights or accessor functions)
for members that will go away is wasted work - especially if this means a
lot of changes in the calling code.

> |      if (pos < array->last())
> |          array->move(pos, shift);
> |      else {
> | -   if (array->last() + shift >= array->maxsize()) {
> | -       array->resize(array->last() + shift);
> | -   }
> | +   array->need_size(array->last() + shift);
> 
> Why not stil use the resize method? But do it unconditinally?

It does not exactly the same in all places (even if it probably would do
the right thing) and I do not want to break anyting until I completely
understood how the whole thing works. Until then I'd rather like to
apply only changes that "obviously do the same as the original code".

Of course you might change anything you want, but in that case ... ;-)

Andre'

-- 
André Pönitz ........................................ [EMAIL PROTECTED]

Reply via email to