diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-05-03 12:47:06 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 12:47:06 +1000 | 
| commit | c985bfbe6de31c510fada1bacccabf338e577c30 (patch) | |
| tree | 02e834573e3136ceb0b6f73239936a299d969679 /src/PositionCache.cxx | |
| parent | a1b2702f9718b1658167976d3740931a7d3433d0 (diff) | |
| download | scintilla-mirror-c985bfbe6de31c510fada1bacccabf338e577c30.tar.gz | |
Add needed casts and remove a cast that is not needed.
Diffstat (limited to 'src/PositionCache.cxx')
| -rw-r--r-- | src/PositionCache.cxx | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 5f3fd03de..e782c77c7 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -232,7 +232,7 @@ Point LineLayout::PointFromPosition(int posInLine, int lineHeight) const {  	for (int subLine = 0; subLine < lines; subLine++) {  		const Range rangeSubLine = SubLineRange(subLine);  		if (posInLine >= rangeSubLine.start) { -			pt.y = subLine*lineHeight; +			pt.y = static_cast<XYPOSITION>(subLine*lineHeight);  			if (posInLine <= rangeSubLine.end) {  				pt.x = positions[posInLine] - positions[rangeSubLine.start];  				if (rangeSubLine.start != 0)	// Wrapped lines may be indented @@ -462,7 +462,7 @@ BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posL  	// Search for first visible break  	// First find the first visible character  	if (xStart > 0.0f) -		nextBreak = ll->FindBefore(xStart, lineStart, lineEnd); +		nextBreak = ll->FindBefore(static_cast<XYPOSITION>(xStart), lineStart, lineEnd);  	// Now back to a style break  	while ((nextBreak > lineStart) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) {  		nextBreak--; @@ -563,7 +563,7 @@ void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_,  	if (s_ && positions_) {  		positions = new XYPOSITION[len + (len / 4) + 1];  		for (unsigned int i=0; i<len; i++) { -			positions[i] = static_cast<XYPOSITION>(positions_[i]); +			positions[i] = positions_[i];  		}  		memcpy(reinterpret_cast<char *>(positions + len), s_, len);  	} | 
