Lars Gullik Bjønnes wrote:
> | What happens if the result is stored in yet another reference and the
> | function is invoked several times? -> Nasty problems!
>
> | const string &ref1 = foo1.name();
> | const string &ref2 = foo1.name();
>
> | if ( ref1 == ref2 ) /* ref1 == ref2!!
On Wed, Feb 20, 2002 at 04:15:48PM +0100, Lars Gullik Bjønnes wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
>
> | lyxlayout.C: In method `const class string & LyXLayout::name() const':
> | lyxlayout.C:740: warning: returning reference to temporary
> | lyxlayout.C: In method `const class s
By accident, I saw your message with the following code:
> string const & LyXLayout::name() const
>{
>string * name = new string(lowercase(name_));
>return * name;
>}
This code produces a memory leak each time it is invoked!
Using a static function variable could help but it is not safe
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> mmm but there will be a lot of places that does not have a
Lars> BufferParam?
Not sure.
Lars> I am not sure if we should do this cleanup now. The patch does
Lars> not exacly make things more unclean that in already is.
Agree
> Please put the following also in your local tree, or I suspect Bug 221
> will still be alive.
This was already fixed this morning.
Jug
--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail: [EMAIL PROTECTED]
Italienallee 13/N
On Wed, Feb 20, 2002 at 04:15:48PM +0100, Lars Gullik Bjønnes wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
>
> | lyxlayout.C: In method `const class string & LyXLayout::name() const':
> | lyxlayout.C:740: warning: returning reference to temporary
> | lyxlayout.C: In method `const class s
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Martin Vermeer <[EMAIL PROTECTED]> writes: | lyxlayout.C: In
Lars> method `const class string & LyXLayout::name() const': |
Lars> lyxlayout.C:740: warning: returning reference to temporary |
Lars> lyxlayout.C: In method `const
>
> I have it like this in my tree now:
>
> string const & LyXLayout::name() const
> {
> name_ = lowercase(name_);
> return name_;
> }
>
>
> string const & LyXLayout::obsoleted_by() const
> {
> obsololeted_by_ = lowercase(obsoleted_by_);
> return obsoleted_by_;
> }
You
On Wed, Feb 20, 2002 at 11:54:04AM +0100, Lars Gullik Bjønnes wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
...
> >>
> >> Please help find the stupid problem.
> >
> | First-off, I see that it trips over the first starred layout (Part*) that
> | it encounters. The non-starred ones before
On Tue, Feb 19, 2002 at 08:43:58PM +0100, Lars Gullik Bjønnes wrote:
> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
>
> | And it still crashes, but should be better...
> | I know there is some small stupid thing in there somewhere, but cannot
> | see it. I'd be really grateful if someone els
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Anyway,
Lars> are you sure that using strings removes all needs to update |
Lars> layouts? For example, if in the new class the given layout is
Lars> obsolete | (which can be t
On Tue, Feb 19, 2002 at 04:58:18PM +0100, Jean-Marc Lasgouttes wrote:
> Great. However, if it appears that what Martin proposes actually fixes
> our problems, I suggest to defer this until after 1.2.0.
does it fix undo/redo with a document class change inbetween too ?
aren't there also other pr
On 19-Feb-2002 Martin Vermeer wrote:
> This argues for a policy of storing the layouts by name IMHO. Unless we
> can fix Undo/Redo too along the same lines.
Well we actually would have to call the SwitchLayoutBetweenClasses for
every Undo/Redo operation. This is easyly doable as I see it.
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
>>
Lars> | Lars> The first cleanup iteration will get rid of this.
>>
Lars> | Great. However, if it appears that
On Tue, Feb 19, 2002 at 04:01:58PM +0100, Lars Gullik Bjønnes wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
>
> >> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> >
> | Lars> The first cleanup iteration will get rid of this.
> >
> | Great. However, if it appears that
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> The first cleanup iteration will get rid of this.
Great. However, if it appears that what Martin proposes actually fixes
our problems, I suggest to defer this until after 1.2.0.
JMarc
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | This is a close
Lars> to working patch, I suspect that all that is missing | is a
Lars> lowercase when reading the layouts. As it is not it crashes upon
Lars> | loading a lyx fi
17 matches
Mail list logo