comparison dwtx/jface/util/Geometry.d @ 192:c3583c6ec027

Added missing default cases for switch statements
author Frank Benoit <benoit@tionex.de>
date Mon, 03 Nov 2008 22:52:26 +0100
parents 46a6e0e6ccd4
children
comparison
equal deleted inserted replaced
191:1ef729510ed6 192:c3583c6ec027
133 return new Point(0, distance); 133 return new Point(0, distance);
134 case DWT.LEFT: 134 case DWT.LEFT:
135 return new Point(-distance, 0); 135 return new Point(-distance, 0);
136 case DWT.RIGHT: 136 case DWT.RIGHT:
137 return new Point(distance, 0); 137 return new Point(distance, 0);
138 default:
138 } 139 }
139 140
140 return new Point(0, 0); 141 return new Point(0, 0);
141 } 142 }
142 143
404 return rectangle.y + rectangle.height - testPoint.y; 405 return rectangle.y + rectangle.height - testPoint.y;
405 case DWT.LEFT: 406 case DWT.LEFT:
406 return testPoint.x - rectangle.x; 407 return testPoint.x - rectangle.x;
407 case DWT.RIGHT: 408 case DWT.RIGHT:
408 return rectangle.x + rectangle.width - testPoint.x; 409 return rectangle.x + rectangle.width - testPoint.x;
410 default:
409 } 411 }
410 412
411 return 0; 413 return 0;
412 } 414 }
413 415
441 bounds.x = toExtrude.x + toExtrude.width - bounds.width; 443 bounds.x = toExtrude.x + toExtrude.width - bounds.width;
442 break; 444 break;
443 case DWT.BOTTOM: 445 case DWT.BOTTOM:
444 bounds.y = toExtrude.y + toExtrude.height - bounds.height; 446 bounds.y = toExtrude.y + toExtrude.height - bounds.height;
445 break; 447 break;
448 default:
446 } 449 }
447 450
448 normalize(bounds); 451 normalize(bounds);
449 452
450 return bounds; 453 return bounds;
466 return DWT.TOP; 469 return DWT.TOP;
467 case DWT.LEFT: 470 case DWT.LEFT:
468 return DWT.RIGHT; 471 return DWT.RIGHT;
469 case DWT.RIGHT: 472 case DWT.RIGHT:
470 return DWT.LEFT; 473 return DWT.LEFT;
474 default:
471 } 475 }
472 476
473 return swtDirectionConstant; 477 return swtDirectionConstant;
474 } 478 }
475 479