Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-22 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > Here is what it looks like when using a std::set for features. > Simpler, isn't it? Indeed. > BTW, there is a semantics problem: in a layout file, when I do > Require foo > Require bar > does it mean that I want foo and bar, or only bar? the former. I also took car

Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-22 Thread Jean-Marc Lasgouttes
Jürgen Spitzmüller <[EMAIL PROTECTED]> writes: > Jean-Marc Lasgouttes wrote: >> I do not think it matter much in terms of speed, so code should be simple. > > OK, I remove that. > >> Because map require two types, doesn't it? This is why I wrote that >> there has to be a simpler type... > > OK, bu

Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-08 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > I do not think it matter much in terms of speed, so code should be simple. OK, I remove that. > Because map require two types, doesn't it? This is why I wrote that > there has to be a simpler type... OK, but the vector does not strike my naive mind overly complicate

Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-08 Thread Jean-Marc Lasgouttes
Jürgen Spitzmüller <[EMAIL PROTECTED]> writes: > Jean-Marc Lasgouttes wrote: >> Why is it necessary to handle the requires_.empty() case? > > It's not really necessary. I just thought I avoid the loop in this (common) > case. I do not think it matter much in terms of speed, so code should be si

Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-08 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > Why is it necessary to handle the requires_.empty() case? It's not really necessary. I just thought I avoid the loop in this (common) case. > What about > using some other datastructure like map (there is > probably something simpler for a set, though)? Why the b

Re: [Cvslog] r22428 - /lyx-devel/trunk/src/TextClass.cpp

2008-01-08 Thread Jean-Marc Lasgouttes
[EMAIL PROTECTED] writes: > + if (requires_.empty()) { > + requires_ = req; > + break; > + } > + for (vector::const_iterator it = req.begin(); > + it != req.