diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-04-25 09:47:54 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-04-25 09:47:54 +1000 | 
| commit | 05a151ffddea04578679bf4a9bc821b19db31e43 (patch) | |
| tree | d0aad218039e13d67fd55df85074589c79f7d33c | |
| parent | 8fc2c35cc482adb64899b78b7d8d00548ba33340 (diff) | |
| download | scintilla-mirror-05a151ffddea04578679bf4a9bc821b19db31e43.tar.gz | |
Bug [#1223]. Removed duplicate code.
| -rw-r--r-- | src/PositionCache.cxx | 3 | 
1 files changed, 1 insertions, 2 deletions
| diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 17bde4891..ea281f7ab 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -794,13 +794,13 @@ void PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, uns  			probe = probe2;  		}  	} +	FontAlias fontStyle = vstyle.styles[styleNumber].font;  	if (len > BreakFinder::lengthStartSubdivision) {  		// Break up into segments  		unsigned int startSegment = 0;  		XYPOSITION xStartSegment = 0;  		while (startSegment < len) {  			const unsigned int lenSegment = pdoc->SafeSegment(s + startSegment, len - startSegment, BreakFinder::lengthEachSubdivision); -			FontAlias fontStyle = vstyle.styles[styleNumber].font;  			surface->MeasureWidths(fontStyle, std::string_view(s + startSegment, lenSegment), positions + startSegment);  			for (unsigned int inSeg = 0; inSeg < lenSegment; inSeg++) {  				positions[startSegment + inSeg] += xStartSegment; @@ -809,7 +809,6 @@ void PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, uns  			startSegment += lenSegment;  		}  	} else { -		FontAlias fontStyle = vstyle.styles[styleNumber].font;  		surface->MeasureWidths(fontStyle, std::string_view(s, len), positions);  	}  	if (probe < pces.size()) { | 
