fix x64 build

This commit is contained in:
Vadim Lopatin 2015-01-22 12:09:10 +04:00
parent 4984dee061
commit 645ed7c9b5
2 changed files with 7 additions and 7 deletions

View File

@ -138,7 +138,7 @@ class OutputLineStream {
default: default:
char[4] d; char[4] d;
for (int i = 0; i < s.length; i++) { for (int i = 0; i < s.length; i++) {
int bytes = encode(d, s[i]); int bytes = cast(int)encode(d, s[i]);
for (int j = 0; j < bytes; j++) for (int j = 0; j < bytes; j++)
_buf[_len++] = d[j]; _buf[_len++] = d[j];
} }
@ -146,7 +146,7 @@ class OutputLineStream {
case EncodingType.UTF16BE: case EncodingType.UTF16BE:
wchar[2] d; wchar[2] d;
for (int i = 0; i < s.length; i++) { for (int i = 0; i < s.length; i++) {
int n = encode(d, s[i]); int n = cast(int)encode(d, s[i]);
for (int j = 0; j < n; j++) { for (int j = 0; j < n; j++) {
_buf[_len++] = cast(char)(d[j] >> 8); _buf[_len++] = cast(char)(d[j] >> 8);
_buf[_len++] = cast(char)(d[j] & 0xFF); _buf[_len++] = cast(char)(d[j] & 0xFF);
@ -156,7 +156,7 @@ class OutputLineStream {
case EncodingType.UTF16LE: case EncodingType.UTF16LE:
wchar[2] d; wchar[2] d;
for (int i = 0; i < s.length; i++) { for (int i = 0; i < s.length; i++) {
int n = encode(d, s[i]); int n = cast(int)encode(d, s[i]);
for (int j = 0; j < n; j++) { for (int j = 0; j < n; j++) {
_buf[_len++] = cast(char)(d[j] & 0xFF); _buf[_len++] = cast(char)(d[j] & 0xFF);
_buf[_len++] = cast(char)(d[j] >> 8); _buf[_len++] = cast(char)(d[j] >> 8);

View File

@ -486,7 +486,7 @@ class EditableContent {
@property EditableContent syntaxHighlighter(SyntaxHighlighter syntaxHighlighter) { @property EditableContent syntaxHighlighter(SyntaxHighlighter syntaxHighlighter) {
_syntaxHighlighter = syntaxHighlighter; _syntaxHighlighter = syntaxHighlighter;
updateTokenProps(0, _lines.length); updateTokenProps(0, cast(int)_lines.length);
return this; return this;
} }
@ -534,7 +534,7 @@ class EditableContent {
/// append one or more lines at end /// append one or more lines at end
void appendLines(dstring[] lines...) { void appendLines(dstring[] lines...) {
TextRange rangeBefore; TextRange rangeBefore;
rangeBefore.start = rangeBefore.end = lineEnd(_lines.length ? _lines.length - 1 : 0); rangeBefore.start = rangeBefore.end = lineEnd(_lines.length ? cast(int)_lines.length - 1 : 0);
EditOperation op = new EditOperation(EditAction.Replace, rangeBefore, lines); EditOperation op = new EditOperation(EditAction.Replace, rangeBefore, lines);
performOperation(op, this); performOperation(op, this);
} }
@ -575,12 +575,12 @@ class EditableContent {
if (_multiline) { if (_multiline) {
_lines = splitDString(newContent); _lines = splitDString(newContent);
_tokenProps.length = _lines.length; _tokenProps.length = _lines.length;
updateTokenProps(0, _lines.length); updateTokenProps(0, cast(int)_lines.length);
} else { } else {
_lines.length = 1; _lines.length = 1;
_lines[0] = replaceEolsWithSpaces(newContent); _lines[0] = replaceEolsWithSpaces(newContent);
_tokenProps.length = 1; _tokenProps.length = 1;
updateTokenProps(0, _lines.length); updateTokenProps(0, cast(int)_lines.length);
} }
notifyContentReplaced(); notifyContentReplaced();
return this; return this;