changeset 1672:2ad866aed0a1

don't need switch anymore it became unnecessary when anchors were separated out in November
author corvid <corvid@lavabit.com>
date Thu, 29 Apr 2010 21:41:51 +0000
parents 7fe586a2c260
children cde7dddff1e7
files dw/textblock.cc
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/dw/textblock.cc	Thu Apr 29 15:36:43 2010 +0200
+++ b/dw/textblock.cc	Thu Apr 29 21:41:51 2010 +0000
@@ -354,8 +354,7 @@
             redrawY = misc::min (redrawY, lineYOffsetWidget (line));
          }
 
-         switch (word->content.type) {
-         case core::Content::WIDGET:
+         if (word->content.type == core::Content::WIDGET) {
             /** \todo Justification within the line is done here. */
             childAllocation.x = xCursor + allocation->x;
             /* align=top:
@@ -412,20 +411,15 @@
                      misc::min(childAllocation.y - allocation->y +
                         childAllocation.ascent + childAllocation.descent,
                         oldChildAllocation->y - this->allocation.y +
-                        oldChildAllocation->ascent + oldChildAllocation->descent);
+                        oldChildAllocation->ascent +
+                        oldChildAllocation->descent);
 
                   redrawY = misc::min (redrawY, childChangedY);
                } else {
                   redrawY = misc::min (redrawY, lineYOffsetWidget (line));
                }
             }
-
             word->content.widget->sizeAllocate (&childAllocation);
-            break;
-
-         default:
-            // make compiler happy
-            break;
          }
 
          xCursor += (word->size.width + word->effSpace);