On Fri, Aug 17, 2007 at 09:28:44AM +0200, Jean-Marc Lasgouttes wrote:
> 
> Err, this is not exactly what I wrote, is it?
> 
> >  InsetLayout const & TextClass::insetlayout(docstring const & name) const 
> >  {
> > -   return insetlayoutlist_[name]; 
> > +   docstring n = name;
> > +   while (!n.empty()) {
> > +           if (!insetlayoutlist_.count(n) > 0)

The negation messes up things... brown paper bag committed.

> > +                   return insetlayoutlist_[n];
> > +           docstring::size_type i = n.find(':');
> > +           if (i == string::npos)
> > +                   n = n.substr(0,i);
> > +   }
> > +   static const InsetLayout empty;
> > +   return empty;
> >  }
> 
> If you want to follow make Abdel happy, use:
>       if (i == string::npos)
>               break;
>       n = n.substr(0,i);
> 
> JMarc

- Martin 

Reply via email to