Mercurial > projects > dwt2
diff org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/FontData.d @ 54:70388b0e6dad
[swt lin] compiles
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 23:31:11 +0100 |
parents | f589fc20a5f9 |
children |
line wrap: on
line diff
--- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/FontData.d Fri Mar 27 21:29:10 2009 +0100 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/FontData.d Fri Mar 27 23:31:11 2009 +0100 @@ -134,8 +134,8 @@ if (end is -1 ) SWT.error(SWT.ERROR_INVALID_ARGUMENT); String version1 = str[ start .. end ]; try { - if (to!(int)(version1) !is 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - } catch (ConversionException e) { + if (Integer.parseInt(version1) !is 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT); + } catch (NumberFormatException e) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } @@ -149,8 +149,8 @@ if (end is -1 ) SWT.error(SWT.ERROR_INVALID_ARGUMENT); float height = 0; try { - height = to!(float)(str[start .. end]); - } catch (ConversionException e) { + height = Float.parseFloat(str[start .. end]); + } catch (NumberFormatException e) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } @@ -159,8 +159,8 @@ if (end is -1 ) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int style = 0; try { - style = to!(int)( str[start .. end ]); - } catch (ConversionException e) { + style = Integer.parseInt( str[start .. end ]); + } catch (NumberFormatException e) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); }