diff dwtx/jface/text/link/TabStopIterator.d @ 134:51e6e63f930e

Regex fix for casts
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 01:46:20 +0200
parents 7d818bd32d63
children 75302ef3f92f
line wrap: on
line diff
--- a/dwtx/jface/text/link/TabStopIterator.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/TabStopIterator.d	Sun Aug 24 01:46:20 2008 +0200
@@ -59,8 +59,8 @@
          * of <code>LinkedPosition</code>.</p>
          */
         public int compare(Object o1, Object o2) {
-            LinkedPosition p1= (LinkedPosition)o1;
-            LinkedPosition p2= (LinkedPosition)o2;
+            LinkedPosition p1= cast(LinkedPosition)o1;
+            LinkedPosition p2= cast(LinkedPosition)o2;
             int i= p1.getSequenceNumber() - p2.getSequenceNumber();
             if (i !is 0)
                 return i;
@@ -127,7 +127,7 @@
         // find the position that follows closest to the current position
         LinkedPosition found= null;
         for (Iterator it= fList.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.offset > current.offset)
                 if (found is null || found.offset > p.offset)
                     found= p;
@@ -177,7 +177,7 @@
         // find the position that follows closest to the current position
         LinkedPosition found= null;
         for (Iterator it= fList.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.offset < current.offset)
                 if (found is null || found.offset < p.offset)
                     found= p;
@@ -193,13 +193,13 @@
     LinkedPosition next(LinkedPosition current) {
         if (!hasNext(current))
             throw new NoSuchElementException();
-        return (LinkedPosition) fList.get(fIndex= getNextIndex(current));
+        return cast(LinkedPosition) fList.get(fIndex= getNextIndex(current));
     }
 
     LinkedPosition previous(LinkedPosition current) {
         if (!hasPrevious(current))
             throw new NoSuchElementException();
-        return (LinkedPosition) fList.get(fIndex= getPreviousIndex(current));
+        return cast(LinkedPosition) fList.get(fIndex= getPreviousIndex(current));
     }
 
     void setCycling(bool mode) {