# HG changeset patch # User Jacob Carlborg # Date 1244663551 -7200 # Node ID 0ba75290f8ce846b8a4481ae70c97376ed464413 # Parent 1ec7c20355bd6dead39fe1c69226bc1e233eadf4 Added a bunch of missing defaults to switch statements diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/accessibility/Accessible.d --- 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(); diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/browser/FilePicker.d --- 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; diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/browser/PromptService2.d --- 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; } diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/graphics/Device.d --- 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; } diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/graphics/GC.d --- 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; } diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/graphics/Image.d --- 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_(); diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/graphics/Path.d --- 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); diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/graphics/TextLayout.d --- 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); diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/Combo.d --- 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) { diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/ExpandBar.d --- 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: } } diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/IME.d --- 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)) { diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/MenuItem.d --- 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; diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/Sash.d --- 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; } diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/ToolTip.d --- 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); } } }; diff -r 1ec7c20355bd -r 0ba75290f8ce dwt/widgets/Widget.d --- 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: