changeset 151:0ba75290f8ce

Added a bunch of missing defaults to switch statements
author Jacob Carlborg <doob@me.com>
date Wed, 10 Jun 2009 21:52:31 +0200
parents 1ec7c20355bd
children 834420cb1486
files dwt/accessibility/Accessible.d dwt/browser/FilePicker.d dwt/browser/PromptService2.d dwt/graphics/Device.d dwt/graphics/GC.d dwt/graphics/Image.d dwt/graphics/Path.d dwt/graphics/TextLayout.d dwt/widgets/Combo.d dwt/widgets/ExpandBar.d dwt/widgets/IME.d dwt/widgets/MenuItem.d dwt/widgets/Sash.d dwt/widgets/ToolTip.d dwt/widgets/Widget.d
diffstat 15 files changed, 25 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/accessibility/Accessible.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/accessibility/Accessible.d	Wed Jun 10 21:52:31 2009 +0200
@@ -258,12 +258,14 @@
             case ACC.ROLE_TABITEM:
                 returnValue.addObject(OS.NSAccessibilityPressAction);
                 break;
+            default:
         }
         
         switch (event.detail) {
             case ACC.ROLE_COMBOBOX:
                 returnValue.addObject(OS.NSAccessibilityConfirmAction);
                 break;
+            default:
         }
         
         
@@ -325,6 +327,7 @@
             case ACC.ROLE_TABFOLDER:
                 returnValue.addObject(OS.NSAccessibilityValueAttribute);
                 break;
+            default:
         }
         
         // The following are expected to report their enabled status (AXEnabled)
@@ -337,6 +340,7 @@
             case ACC.ROLE_COMBOBOX:
                 returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
                 break;
+            default:
         }
         
         // The following are expected to report a title (AXTitle)
@@ -347,6 +351,7 @@
             case ACC.ROLE_TABITEM:
                 returnValue.addObject(OS.NSAccessibilityTitleAttribute);
                 break;
+            default:
         }
         
         // Accessibility verifier says these attributes must be reported for combo boxes.
@@ -747,6 +752,7 @@
                     if (value !is null) returnValue = NSString.stringWith(value);
                 }
                 break;
+            default:
         }
         
         return returnValue;
@@ -1184,6 +1190,7 @@
                     // FALL THROUGH
                 case '\n':
                     lineNumber++;
+                default:
             }
         }
         return lineNumber;
@@ -1209,6 +1216,7 @@
                     // FALL THROUGH
                 case '\n':
                     line++;
+                default:
             }
         }
         range.length = count;
@@ -1454,6 +1462,7 @@
             case ACC.ROLE_PROGRESSBAR: nsReturnValue = OS.NSAccessibilityProgressIndicatorRole; break;
             case ACC.ROLE_SLIDER: nsReturnValue = OS.NSAccessibilitySliderRole; break;
             case ACC.ROLE_LINK: nsReturnValue = OS.NSAccessibilityLinkRole; break;
+            default:
         }
         
         return nsReturnValue.getString();
--- a/dwt/browser/FilePicker.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/browser/FilePicker.d	Wed Jun 10 21:52:31 2009 +0200
@@ -258,6 +258,7 @@
         case nsIFilePicker.filterXUL:
             addFilters[0] = "*.xul";    //$NON-NLS-1$
             break;
+        default:
     }
     if (masks is null) {
         masks = addFilters;
--- a/dwt/browser/PromptService2.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/browser/PromptService2.d	Wed Jun 10 21:52:31 2009 +0200
@@ -163,6 +163,7 @@
             //XPCOM.memmove (dest, buttonTitle, length * 2);
             label = Utf.toString (buttonTitle[0 .. span]);
         }
+        default:
     }
     return label;
 }
--- a/dwt/graphics/Device.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/graphics/Device.d	Wed Jun 10 21:52:31 2009 +0200
@@ -470,6 +470,7 @@
         case DWT.COLOR_MAGENTA:             return COLOR_MAGENTA;
         case DWT.COLOR_CYAN:                return COLOR_CYAN;
         case DWT.COLOR_WHITE:               return COLOR_WHITE;
+        default:
     }
     return COLOR_BLACK;
 }
--- a/dwt/graphics/GC.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/graphics/GC.d	Wed Jun 10 21:52:31 2009 +0200
@@ -2131,6 +2131,7 @@
                     if (pointCount !is 0) clipRgn.add(pointArray, pointCount);
                     pointCount = 0;
                     break;
+                default:
             }
         }
         if (pointCount !is 0) clipRgn.add(pointArray, pointCount);
@@ -2280,6 +2281,7 @@
         case OS.NSImageInterpolationNone: return DWT.NONE;
         case OS.NSImageInterpolationLow: return DWT.LOW;
         case OS.NSImageInterpolationHigh: return DWT.HIGH;
+        default:
     }
     return DWT.DEFAULT;
 }
--- a/dwt/graphics/Image.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/graphics/Image.d	Wed Jun 10 21:52:31 2009 +0200
@@ -337,6 +337,7 @@
                 }
                 break;
             }
+            default:
             }
         }
     init_();
--- a/dwt/graphics/Path.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/graphics/Path.d	Wed Jun 10 21:52:31 2009 +0200
@@ -591,6 +591,7 @@
             case OS.NSClosePathBezierPathElement:
                     types[typeCount++] = DWT.PATH_CLOSE;
                     break;
+            default:
             }
         }
         OS.free(points);
--- a/dwt/graphics/TextLayout.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/graphics/TextLayout.d	Wed Jun 10 21:52:31 2009 +0200
@@ -263,6 +263,7 @@
                 case UNDERLINE_THICK:
                     underlineStyle = OS.NSUnderlineStyleThick;
                     break;
+                default:
             }
             if (underlineStyle !is 0) {
                 textStorage.addAttribute(OS.NSUnderlineStyleAttributeName, NSNumber.numberWithInt(underlineStyle), range);
@@ -509,6 +510,7 @@
                                     }
                                     break;
                                 }
+                                default:
                                 }
                                 path.stroke();
                                 gc.handle.restoreGraphicsState();
@@ -543,6 +545,7 @@
                                 case DWT.BORDER_SOLID:  break;
                                 case DWT.BORDER_DASH: dashes = width !is 0 ? GC.LINE_DASH : GC.LINE_DASH_ZERO; break;
                                 case DWT.BORDER_DOT: dashes = width !is 0 ? GC.LINE_DOT : GC.LINE_DOT_ZERO; break;
+                                default:
                                 }
                                 NSBezierPath path = NSBezierPath.bezierPath();
                                 path.setLineDash(dashes.ptr, dashes !is null ? dashes.length : 0, 0);
--- a/dwt/widgets/Combo.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/Combo.d	Wed Jun 10 21:52:31 2009 +0200
@@ -1217,6 +1217,7 @@
             case 9: /* V */
                 paste ();
                 return false;
+            default:
         }
     }
     if ((style & DWT.SINGLE) !is 0) {
--- a/dwt/widgets/ExpandBar.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/ExpandBar.d	Wed Jun 10 21:52:31 2009 +0200
@@ -598,6 +598,7 @@
         case DWT.TRAVERSE_TAB_PREVIOUS:
             event.doit = true;
             break;
+        default:
     }
 }
 
--- a/dwt/widgets/IME.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/IME.d	Wed Jun 10 21:52:31 2009 +0200
@@ -303,7 +303,6 @@
                 case OS.NSUnderlineStyleDouble: style.underlineStyle = DWT.UNDERLINE_DOUBLE; break;
                 case OS.NSUnderlineStyleThick: style.underlineStyle = UNDERLINE_THICK; break;
                 default:
-                    assert(false);
             }
             style.underline = value.intValue () !is OS.NSUnderlineStyleNone;
         } else if (key.isEqualTo (OS.NSStrikethroughColorAttributeName)) {
--- a/dwt/widgets/MenuItem.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/MenuItem.d	Wed Jun 10 21:52:31 2009 +0200
@@ -820,6 +820,7 @@
                             case '7': key = 0xF70A; break;
                             case '8': key = 0xF70B; break;
                             case '9': key = 0xF70C; break;
+                            default:
                         }
                     }
                     break;
@@ -832,6 +833,7 @@
                             case '3': key = 0xF710; break;
                             case '4': key = 0xF711; break;
                             case '5': key = 0xF712; break;
+                            default:
                         }
                     }
                     break;
--- a/dwt/widgets/Sash.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/Sash.d	Wed Jun 10 21:52:31 2009 +0200
@@ -366,6 +366,7 @@
             }
             break;
         }
+        default:
     }
     return true;
 }
--- a/dwt/widgets/ToolTip.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/ToolTip.d	Wed Jun 10 21:52:31 2009 +0200
@@ -128,7 +128,6 @@
                 case DWT.Paint: onPaint (event); break;
                 case DWT.MouseDown: onMouseDown (event); break;
                 default:
-                    assert(false);
             }
         }
         };
--- a/dwt/widgets/Widget.d	Wed Jun 10 20:51:17 2009 +0200
+++ b/dwt/widgets/Widget.d	Wed Jun 10 21:52:31 2009 +0200
@@ -1332,6 +1332,7 @@
                 case 2: event.stateMask |= DWT.BUTTON2; break;
                 case 3: event.stateMask |= DWT.BUTTON4; break;
                 case 4: event.stateMask |= DWT.BUTTON5; break;
+                default:
             }
             break;
         case OS.NSScrollWheel: