[haiku-commits] r38885 - in haiku/trunk: headers/libs/alm src/libs/alm

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 4 Oct 2010 21:10:22 +0200 (CEST)

Author: czeidler
Date: 2010-10-04 21:10:22 +0200 (Mon, 04 Oct 2010)
New Revision: 38885
Changeset: http://dev.haiku-os.org/changeset/38885

Modified:
   haiku/trunk/headers/libs/alm/Area.h
   haiku/trunk/src/libs/alm/ALMLayout.cpp
   haiku/trunk/src/libs/alm/Area.cpp
Log:
Fix gcc2 build + warnings.



Modified: haiku/trunk/headers/libs/alm/Area.h
===================================================================
--- haiku/trunk/headers/libs/alm/Area.h 2010-10-04 18:48:42 UTC (rev 38884)
+++ haiku/trunk/headers/libs/alm/Area.h 2010-10-04 19:10:22 UTC (rev 38885)
@@ -86,14 +86,14 @@
                        void                            
SetShrinkPenalties(BSize shrink);
                        void                            SetGrowPenalties(BSize 
grow);
 
-                       int32                           LeftInset() const;
-                       int32                           TopInset() const;
-                       int32                           RightInset() const;
-                       int32                           BottomInset() const;
-                       void                            SetLeftInset(int32 
left);
-                       void                            SetTopInset(int32 top);
-                       void                            SetRightInset(int32 
right);
-                       void                            SetBottomInset(int32 
bottom);
+                       float                           LeftInset() const;
+                       float                           TopInset() const;
+                       float                           RightInset() const;
+                       float                           BottomInset() const;
+                       void                            SetLeftInset(float 
left);
+                       void                            SetTopInset(float top);
+                       void                            SetRightInset(float 
right);
+                       void                            SetBottomInset(float 
bottom);
 
                                                                operator 
BString() const;
                        void                            GetString(BString& 
string) const;

Modified: haiku/trunk/src/libs/alm/ALMLayout.cpp
===================================================================
--- haiku/trunk/src/libs/alm/ALMLayout.cpp      2010-10-04 18:48:42 UTC (rev 
38884)
+++ haiku/trunk/src/libs/alm/ALMLayout.cpp      2010-10-04 19:10:22 UTC (rev 
38885)
@@ -277,7 +277,7 @@
        else {
                for (unsigned int i = 0; i < item.GroupItems().size(); i++) {
                        GroupItem& current = const_cast<GroupItem&>(
-                               item.GroupItems().at(i));
+                               item.GroupItems()[i]);
                        if (item.Orientation() == B_HORIZONTAL) {
                                XTab* r = (i == item.GroupItems().size() - 1) ? 
right
                                        : AddXTab();
@@ -417,7 +417,7 @@
 BALMLayout::AddItem(int32 index, BLayoutItem* item)
 {
        if (!item)
-               return NULL;
+               return false;
 
        // simply add the item at the upper right corner of the previous item
        // TODO maybe find a more elegant solution

Modified: haiku/trunk/src/libs/alm/Area.cpp
===================================================================
--- haiku/trunk/src/libs/alm/Area.cpp   2010-10-04 18:48:42 UTC (rev 38884)
+++ haiku/trunk/src/libs/alm/Area.cpp   2010-10-04 19:10:22 UTC (rev 38885)
@@ -368,7 +368,7 @@
 /**
  * Gets left inset between area and its content.
  */
-int32
+float
 Area::LeftInset() const
 {
        if (fTopLeftInset.IsWidthSet())
@@ -384,7 +384,7 @@
 /**
  * Gets top inset between area and its content.
  */
-int32
+float
 Area::TopInset() const
 {
        if (fTopLeftInset.IsHeightSet())
@@ -400,7 +400,7 @@
 /**
  * Gets right inset between area and its content.
  */
-int32
+float
 Area::RightInset() const
 {
        if (fRightBottomInset.IsWidthSet())
@@ -416,7 +416,7 @@
 /**
  * Gets bottom inset between area and its content.
  */
-int32
+float
 Area::BottomInset() const
 {
        if (fRightBottomInset.IsHeightSet())
@@ -433,7 +433,7 @@
  * Sets left inset between area and its content.
  */
 void
-Area::SetLeftInset(int32 left)
+Area::SetLeftInset(float left)
 {
        fTopLeftInset.width = left;
        fLayoutItem->Layout()->InvalidateLayout();
@@ -444,7 +444,7 @@
  * Sets top inset between area and its content.
  */
 void
-Area::SetTopInset(int32 top)
+Area::SetTopInset(float top)
 {
        fTopLeftInset.height = top;
        fLayoutItem->Layout()->InvalidateLayout();
@@ -455,7 +455,7 @@
  * Sets right inset between area and its content.
  */
 void
-Area::SetRightInset(int32 right)
+Area::SetRightInset(float right)
 {
        fRightBottomInset.width = right;
        fLayoutItem->Layout()->InvalidateLayout();
@@ -466,7 +466,7 @@
  * Sets bottom inset between area and its content.
  */
 void
-Area::SetBottomInset(int32 bottom)
+Area::SetBottomInset(float bottom)
 {
        fRightBottomInset.height = bottom;
        fLayoutItem->Layout()->InvalidateLayout();


Other related posts:

  • » [haiku-commits] r38885 - in haiku/trunk: headers/libs/alm src/libs/alm - clemens . zeidler