Commit 8863eeeb45867e65fcc278299907d1dde79aa286

sammy 2008-05-07T15:03:48

* Change the += operator for bounding boxes to |=, which better represents what is happening, and avoids future confusion with "FTBBox + FTPoint" constructs.

diff --git a/src/FTFont/FTFont.cpp b/src/FTFont/FTFont.cpp
index 2c9b070..3a71b6f 100644
--- a/src/FTFont/FTFont.cpp
+++ b/src/FTFont/FTFont.cpp
@@ -454,7 +454,7 @@ inline FTBBox FTFontImpl::BBoxI(const T* string, const int start, const int end)
                 FTBBox tempBBox = glyphList->BBox(string[i]);
                 tempBBox.Move(FTPoint(advance, 0.0f, 0.0f));
 
-                totalBBox += tempBBox;
+                totalBBox |= tempBBox;
                 advance += glyphList->Advance(string[i], string[i + 1]);
             }
         }
diff --git a/src/FTGL/FTBBox.h b/src/FTGL/FTBBox.h
index 47a2722..faf2d5f 100644
--- a/src/FTGL/FTBBox.h
+++ b/src/FTGL/FTBBox.h
@@ -128,7 +128,7 @@ class FTGL_EXPORT FTBBox
             return *this;
         }
 
-        FTBBox& operator += (const FTBBox& bbox)
+        FTBBox& operator |= (const FTBBox& bbox)
         {
             if(bbox.lower.X() < lower.X()) lower.X(bbox.lower.X());
             if(bbox.lower.Y() < lower.Y()) lower.Y(bbox.lower.Y());
diff --git a/src/FTLayout/FTSimpleLayout.cpp b/src/FTLayout/FTSimpleLayout.cpp
index e57c214..ce4faaa 100644
--- a/src/FTLayout/FTSimpleLayout.cpp
+++ b/src/FTLayout/FTSimpleLayout.cpp
@@ -401,7 +401,7 @@ inline void FTSimpleLayoutImpl::OutputWrappedI(const T *buf, const int start,
         // See if this is the first area to be added to the bounds
         if(bounds->IsValid())
         {
-            *bounds += temp;
+            *bounds |= temp;
         }
         else
         {