Andre Poenitz <[EMAIL PROTECTED]> writes:

| On Mon, Oct 20, 2003 at 02:58:42PM +0200, Jean-Marc Lasgouttes wrote:
>> 
>> When compiling text.C I get the following warning:
>> 
>> ../../lyx-devel/src/text.C: In method `int LyXText::rightMargin (const 
>> Paragraph &, const Buffer &, const Row &) const':
>> ../../lyx-devel/src/text.C:615: warning: value computed is not used
>> 
>> Indeed rightMargine reads:
>> 
>> int LyXText::rightMargin(Paragraph const & par,
>>      Buffer const & buf, Row const &) const
>> {
>>      LyXTextClass const & tclass = buf.params().getLyXTextClass();
>>      LyXLayout_ptr const & layout = par.layout();
>> 
>>      return PAPER_MARGIN
>>              + font_metrics::signedWidth(tclass.rightmargin(),
>>                                     tclass.defaultfont());
>>              + font_metrics::signedWidth(layout->rightmargin,
>>                                     tclass.defaultfont())
>>              * 4 / (par.getDepth() + 4);
>> }
>> 
>> 
>> How long do you need to spot the error?
>
| More than 30 seconds.
>
>> Who designed a language allowing such stupid constructs?
>
| Bjarne Stroustrup IIRC ;-)
>
>> I am not sure what the fix is, so I'll let someone who knows fix the
>> function.
>
| I'd remove the ';' for starters...

Are you sure... this looks like a cut and paste error where a new line
was inserted but the old one not deleted. As such it looks as left
over from leftMargine because of the depth check (which does not
matter for rightmarign)

| Andre'
>
| -- 
| Those who desire to give up Freedom in order to gain Security, will not have,
| nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)
>

-- 
        Lgb

Reply via email to