diff options
author | nyamatongwe <unknown> | 2002-04-21 10:20:59 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-04-21 10:20:59 +0000 |
commit | 5ce0189a77f46696eaa1f3cc5dd0aff2bb5cabd4 (patch) | |
tree | 39857adc7906b22cb6629149b0ee36eb91f13e04 /src/Document.cxx | |
parent | 58510c0fbafdcf5ceed956a208fc34a65cb55358 (diff) | |
download | scintilla-mirror-5ce0189a77f46696eaa1f3cc5dd0aff2bb5cabd4.tar.gz |
Some Win64 compatibility and size_t correctness.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index def80c49c..22cb0c2b0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -512,15 +512,16 @@ bool Document::InsertString(int position, const char *s) { } // Insert a string with a length -bool Document::InsertString(int position, const char *s, int insertLength) { +bool Document::InsertString(int position, const char *s, size_t insertLength) { bool changed = false; char *sWithStyle = new char[insertLength * 2]; if (sWithStyle) { - for (int i = 0; i < insertLength; i++) { + for (size_t i = 0; i < insertLength; i++) { sWithStyle[i*2] = s[i]; sWithStyle[i*2 + 1] = 0; } - changed = InsertStyledString(position*2, sWithStyle, insertLength*2); + changed = InsertStyledString(position*2, sWithStyle, + static_cast<int>(insertLength*2)); delete []sWithStyle; } return changed; @@ -928,7 +929,7 @@ long Document::FindText(int minPos, int maxPos, const char *s, // Compute actual search ranges needed int lengthFind = *length; if (lengthFind == -1) - lengthFind = strlen(s); + lengthFind = static_cast<int>(strlen(s)); int endSearch = endPos; if (startPos <= endPos) { endSearch = endPos - lengthFind + 1; |