diff options
| author | Neil <unknown> | 2014-02-10 15:04:34 +1100 | 
|---|---|---|
| committer | Neil <unknown> | 2014-02-10 15:04:34 +1100 | 
| commit | 1bb6f0022eeb025bd6e74c80d3e0c4d761523225 (patch) | |
| tree | d7191da967e9d18c5394d6a57284158598a9d581 /qt/ScintillaEditBase/ScintillaQt.cpp | |
| parent | cbef67a19434cd5d4d71e217a2b6dcbf8df70786 (diff) | |
| download | scintilla-mirror-1bb6f0022eeb025bd6e74c80d3e0c4d761523225.tar.gz | |
Fix 'possible loss of data' warnings on 64-bit Windows.
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaQt.cpp')
| -rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp index 2e3b9a0a5..03218cf34 100644 --- a/qt/ScintillaEditBase/ScintillaQt.cpp +++ b/qt/ScintillaEditBase/ScintillaQt.cpp @@ -172,11 +172,11 @@ bool ScintillaQt::DragThreshold(Point ptStart, Point ptNow)  static QString StringFromSelectedText(const SelectionText &selectedText)  {  	if (selectedText.codePage == SC_CP_UTF8) { -		return QString::fromUtf8(selectedText.Data(), selectedText.Length()); +		return QString::fromUtf8(selectedText.Data(), static_cast<int>(selectedText.Length()));  	} else {  		QTextCodec *codec = QTextCodec::codecForName(  				CharacterSetID(selectedText.characterSet)); -		return codec->toUnicode(selectedText.Data(), selectedText.Length()); +		return codec->toUnicode(selectedText.Data(), static_cast<int>(selectedText.Length()));  	}  } @@ -350,9 +350,9 @@ void ScintillaQt::PasteFromMode(QClipboard::Mode clipboardMode_)  		sel.Rectangular().Start() :  		sel.Range(sel.Main()).Start();  	if (selText.rectangular) { -		PasteRectangular(selStart, selText.Data(), selText.Length()); +		PasteRectangular(selStart, selText.Data(), static_cast<int>(selText.Length()));  	} else { -		InsertPaste(selStart, selText.Data(), selText.Length()); +		InsertPaste(selStart, selText.Data(), static_cast<int>(selText.Length()));  	}  	EnsureCaretVisible();  } @@ -502,7 +502,7 @@ public:  			folded[0] = mapping[static_cast<unsigned char>(mixed[0])];  			return 1;  		} else if (codec) { -			QString su = codec->toUnicode(mixed, lenMixed); +			QString su = codec->toUnicode(mixed, static_cast<int>(lenMixed));  			QString suFolded = su.toCaseFolded();  			QByteArray bytesFolded = codec->fromUnicode(suFolded); @@ -555,14 +555,14 @@ std::string ScintillaQt::CaseMapString(const std::string &s, int caseMapping)  	if (IsUnicodeMode()) {  		std::string retMapped(s.length() * maxExpansionCaseConversion, 0); -		size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),  +		size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),  			(caseMapping == cmUpper) ? CaseConversionUpper : CaseConversionLower);  		retMapped.resize(lenMapped);  		return retMapped;  	}  	QTextCodec *codec = QTextCodec::codecForName(CharacterSetIDOfDocument()); -    QString text = codec->toUnicode(s.c_str(), s.length()); +	QString text = codec->toUnicode(s.c_str(), static_cast<int>(s.length()));  	if (caseMapping == cmUpper) {  		text = text.toUpper();  | 
