Re: commit -- fix (Re: commit: New Lists Implementation.)


Subject: Re: commit -- fix (Re: commit: New Lists Implementation.)
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sat Sep 16 2000 - 08:24:18 CDT


On Fri, 15 Sep 2000, sam th wrote:

>
> It did indeed fail on windows. I believe that the attached patch will fix
> the problem, but would appreciate it if someone could check that for me.
> It does still compile on Unix. (This doesn't break your code, does it
> Martin?)
>

I didn't expect that to fail. I'm still a bit clueless about constness. If
that works on Unix go for it. This piece of code was to fix a bug that
occurs if you cut all text from a paragraph. The Line class ends up with
o entries in its vector of runs and tried to retrun the last run.

Cheers

Martin

> Index: src/text/fmt/xp/fp_Line.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Line.cpp,v
> retrieving revision 1.74
> diff -u -r1.74 fp_Line.cpp
> --- src/text/fmt/xp/fp_Line.cpp 2000/09/15 06:51:59 1.74
> +++ src/text/fmt/xp/fp_Line.cpp 2000/09/15 13:54:59
> @@ -822,11 +822,11 @@
> if( i <= 0 )
> {
> fp_Run * pRun = getBlock()->getFirstRun();
> - return (const) pRun;
> + return pRun;
> }
> else
> {
> - return ((const fp_Run*) m_vecRuns.getLastItem());
> + return ((fp_Run*) m_vecRuns.getLastItem());
> }
> }
>
>
> sam th
> sam@uchicago.edu
> http://www.abisource.com/~sam
>
>
>



This archive was generated by hypermail 2b25 : Sat Sep 16 2000 - 08:24:30 CDT