On Mon, May 14, 2007 at 04:57:03PM -0000, [EMAIL PROTECTED] wrote:
> +int DocIterator::find(MathData const & cell) const
> +{
> +     for (size_t l = 0; l != slices_.size(); ++l) {
> +             if (slices_[l].asInsetMath() && &slices_[l].cell() == &cell)
> +                     return l;
> +     }
> +     return -1;
> +}
> +
> +
> +int DocIterator::find(InsetMath const * inset) const 
> +{
> +     for (size_t l = 0; l != slices_.size(); ++l) {
> +             if (slices_[l].asInsetMath() == inset)
> +                     return l;
> +     }
> +     return -1;
> +}

Are the used somewhere?

> +void DocIterator::cutOff(int above, std::vector<CursorSlice> & cut)
> +{
> +     cut.resize(std::max((int)slices_.size()-above-1, 0));
> +     for (size_t i = 0; above+1+i < slices_.size(); ++i)
> +             cut[i] = slices_[above+1+i];
> +     slices_.resize(above+1);
> +}

Spacing.

> +void DocIterator::cutOff(int above) 
> +{
> +     slices_.resize(above+1);
> +}
> +
> +
> +void DocIterator::append(std::vector<CursorSlice> const x) 
> +{
> +     for (size_t i = 0; i < x.size(); ++i)
> +             slices_.push_back(x[i]);
> +}

Isn't there std::vector<>::insert?

Why isn't 'x passed by reference?

> +
> +
> +void DocIterator::append(int idx, int pos) 
> +{
> +     slices_.push_back(CursorSlice());
> +     top().idx() = idx;
> +     top().pos() = pos;
> +}
> +
> +
>  std::ostream & operator<<(std::ostream & os, DocIterator const & dit)
>  {
>       for (size_t i = 0, n = dit.depth(); i != n; ++i)
>               os << " " << dit[i] << "\n";
>       return os;
>  }


I seemingly missed the discussion of this pathc on the list. Can anybody
give me a pointer?

Andre'

Reply via email to