Mercurial > projects > dwt-addons
diff dwtx/jface/text/ListLineTracker.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 | 6dcb0baaa031 |
line wrap: on
line diff
--- a/dwtx/jface/text/ListLineTracker.d Sun Aug 24 01:29:22 2008 +0200 +++ b/dwtx/jface/text/ListLineTracker.d Sun Aug 24 01:46:20 2008 +0200 @@ -210,7 +210,7 @@ mid= (left + right) / 2; - line= (Line) fLines.get(mid); + line= cast(Line) fLines.get(mid); if (offset < line.offset) { if (left is mid) right= left; @@ -226,7 +226,7 @@ } } - line= (Line) fLines.get(left); + line= cast(Line) fLines.get(left); if (line.offset > offset) --left; return left; @@ -248,7 +248,7 @@ int target= offset + length; - Line l= (Line) fLines.get(startLine); + Line l= cast(Line) fLines.get(startLine); if (l.delimiter is null) return 1; @@ -274,7 +274,7 @@ if (lines is 0 || lines is line) return 0; - Line l= (Line) fLines.get(line); + Line l= cast(Line) fLines.get(line); return l.length; } @@ -291,7 +291,7 @@ if (lastLine < 0) return 0; - Line l= (Line) fLines.get(lastLine); + Line l= cast(Line) fLines.get(lastLine); return (l.delimiter !is null ? lastLine + 1 : lastLine); } @@ -309,7 +309,7 @@ int size= fLines.size(); if (size is 0) return new Region(0, 0); - Line l= (Line) fLines.get(size - 1); + Line l= cast(Line) fLines.get(size - 1); return (l.delimiter !is null ? new Line(fTextLength, 0) : new Line(fTextLength - l.length, l.length)); } @@ -329,11 +329,11 @@ return new Line(0, 0); if (line is lines) { - Line l= (Line) fLines.get(line - 1); + Line l= cast(Line) fLines.get(line - 1); return new Line(l.offset + l.length, 0); } - Line l= (Line) fLines.get(line); + Line l= cast(Line) fLines.get(line); return (l.delimiter !is null ? new Line(l.offset, l.length - l.delimiter.length()) : l); } @@ -350,13 +350,13 @@ return 0; if (line is lines) { - Line l= (Line) fLines.get(line - 1); + Line l= cast(Line) fLines.get(line - 1); if (l.delimiter !is null) return l.offset + l.length; throw new BadLocationException(); } - Line l= (Line) fLines.get(line); + Line l= cast(Line) fLines.get(line); return l.offset; } @@ -369,7 +369,7 @@ if (lines is 0) return 1; - Line l= (Line) fLines.get(lines - 1); + Line l= cast(Line) fLines.get(lines - 1); return (l.delimiter !is null ? lines + 1 : lines); } @@ -417,7 +417,7 @@ if (line is lines) return null; - Line l= (Line) fLines.get(line); + Line l= cast(Line) fLines.get(line); return l.delimiter; } @@ -464,7 +464,7 @@ if (start < text.length()) { if (insertPosition + count < fLines.size()) { // there is a line below the current - Line l= (Line) fLines.get(insertPosition + count); + Line l= cast(Line) fLines.get(insertPosition + count); int delta= text.length() - start; l.offset-= delta; l.length+= delta;