diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 | 
| commit | cda15af9657880e91ccf65603e109b202d9e78bf (patch) | |
| tree | eb730cdcc810842ce2255c3d2af9872041583a74 /src/LineMarker.cxx | |
| parent | dba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff) | |
| download | scintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz | |
Added const where possible.
Diffstat (limited to 'src/LineMarker.cxx')
| -rw-r--r-- | src/LineMarker.cxx | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 53d9617c4..e2de5d97e 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -122,11 +122,11 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac  	int minDim = Platform::Minimum(static_cast<int>(rc.Width()), static_cast<int>(rc.Height()));  	minDim--;	// Ensure does not go beyond edge  	int centreX = static_cast<int>(floor((rc.right + rc.left) / 2.0)); -	int centreY = static_cast<int>(floor((rc.bottom + rc.top) / 2.0)); -	int dimOn2 = minDim / 2; -	int dimOn4 = minDim / 4; +	const int centreY = static_cast<int>(floor((rc.bottom + rc.top) / 2.0)); +	const int dimOn2 = minDim / 2; +	const int dimOn4 = minDim / 4;  	int blobSize = dimOn2-1; -	int armSize = dimOn2-2; +	const int armSize = dimOn2-2;  	if (marginStyle == SC_MARGIN_NUMBER || marginStyle == SC_MARGIN_TEXT || marginStyle == SC_MARGIN_RTEXT) {  		// On textual margins move marker to the left to try to avoid overlapping the text  		centreX = static_cast<int>(rc.left) + dimOn2 + 1; @@ -384,7 +384,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac  		rcLeft.right = rcLeft.left + 4;  		surface->FillRectangle(rcLeft, back);  	} else if (markType == SC_MARK_BOOKMARK) { -		int halfHeight = minDim / 3; +		const int halfHeight = minDim / 3;  		Point pts[] = {  			Point::FromInts(static_cast<int>(rc.left), centreY-halfHeight),  			Point::FromInts(static_cast<int>(rc.right) - 3, centreY - halfHeight), | 
