On Fri, Nov 07, 2003 at 12:12:33PM +0100, Lars Gullik Bjønnes spake thusly:
 
> Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> | Index: src/factory.C
> | ===================================================================
> | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/factory.C,v
> | retrieving revision 1.66
> | diff -u -p -r1.66 factory.C
> | --- src/factory.C   3 Nov 2003 17:47:22 -0000       1.66
> | +++ src/factory.C   7 Nov 2003 09:57:51 -0000
> | @@ -86,6 +87,12 @@ InsetOld * createInset(FuncRequest const
> |     case LFUN_INSET_MINIPAGE:
> |             return new InsetMinipage(params);
> |  
> | +   case LFUN_INSERT_ELEMENT: {
> | +           string s = cmd.getArg(0);
> | +           Element * found_el = params.getLyXTextClass().element(s);
> | +           return new InsetElement(params, found_el);
> | +   }
> | +
> 
> Use of "Element *" here is wrong it should be an
> vector<Element>::iterator.
 
Fixed.
 
> | Index: src/lyxtextclass.C
> | ===================================================================
> | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtextclass.C,v
> | retrieving revision 1.42
> | diff -u -p -r1.42 lyxtextclass.C
> | --- src/lyxtextclass.C      3 Nov 2003 17:47:22 -0000       1.42
> | +++ src/lyxtextclass.C      7 Nov 2003 09:57:51 -0000
> | @@ -56,6 +56,10 @@ struct compare_name {
> |  } // anon
> |  
> |  
> | +Element::Element()
> | +{}
> | +
> | +
> 
> Why is this constructor needed at all?

It is. Try remove it if you don't believe :-)
 
> | +   /// Elements of this doc class
> | +   std::vector<Element> & elements() const { return elementlist_; };
> | +   /// Retrieve element of name s:
> | +   std::vector<Element>::iterator element(std::string const & s)
> | +   const;
> 
> Perhaps a typdef for vector<Element>?
> 
> typedef std::vector<Element> Elements;

Done.
 
> 
> And the "Element" name must change.

Done too. 
 
> -- 
>       Lgb
> 

Latest greatest attached.

- Martin

-- 
Martin Vermeer  [EMAIL PROTECTED]
Helsinki University of Technology 
Dept. of Surveying, Inst. of Geodesy
P.O. Box 1200, FIN-02015 HUT, Finland
:wq

Attachment: x.diff.gz
Description: application/gunzip

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to