[haiku-development] Re: Layout question

  • From: Ralf Schülke <teammaui@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 03 Sep 2008 10:07:42 +0200

On Wed, 03 Sep 2008 08:56:28 +0200, Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx> wrote:


Hi
Any reason why the SimpleLayouter (and ComplexLayouter) constructor
accepts an int32 parameter for spacing, while
BTwoDimensionalLayout::CompoundLayouter::_Spacing() returns a float ?
This produces a warning while compiling TwoDimensionalLayout.cpp with
gcc4, since _Spacing() is passed as second paramenter of the above
constructor. While the fix is easy, I was wondering why spacing was
defined with two different types.


oh ah :
you mean:
------------
// _Spacing
float
BTwoDimensionalLayout::CompoundLayouter::_Spacing()
{
        if (!fLocalLayouters.IsEmpty())
                return 
((LocalLayouter*)fLocalLayouters.ItemAt(0))->Spacing(this);
        return 0;
}
--------------

i think return 0; is not needed :-)
--
Ralf Schülke aka stargater

Other related posts: