Mercurial > projects > dwt2
diff org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/internal/Library.d @ 51:c01d033c633a
[swt lin]
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 19:58:06 +0100 |
parents | f589fc20a5f9 |
children |
line wrap: on
line diff
--- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/internal/Library.d Fri Mar 27 15:30:20 2009 +0100 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/internal/Library.d Fri Mar 27 19:58:06 2009 +0100 @@ -14,12 +14,6 @@ import java.lang.all; -version(Tango){ - import tango.util.Convert; -} else { // Phobos - import std.conv; -} - // do it here, so it can be evaluated at compile time // this saves a static ctor. private int buildSWT_VERSION (int major, int minor) { @@ -69,18 +63,18 @@ } while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) major = to!(int)( aVersion[start .. index] ); - } catch (ConversionException e) {} + if (start < length) major = Integer.parseInt( aVersion[start .. index] ); + } catch (NumberFormatException e) {} start = ++index; while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) minor = to!(int)(aVersion[start .. index]); - } catch (ConversionException e) {} + if (start < length) minor = Integer.parseInt(aVersion[start .. index]); + } catch (NumberFormatException e) {} start = ++index; while (index < length && isDigit(aVersion[index])) index++; try { - if (start < length) micro = to!(int)(aVersion[start .. index]); - } catch (ConversionException e) {} + if (start < length) micro = Integer.parseInt(aVersion[start .. index]); + } catch (NumberFormatException e) {} return buildJAVA_VERSION(major, minor, micro); }