diff options
Diffstat (limited to 'src/MarginView.cxx')
| -rw-r--r-- | src/MarginView.cxx | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/src/MarginView.cxx b/src/MarginView.cxx index be743213d..27bf1e10d 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -64,10 +64,10 @@ void DrawWrapMarker(Surface *surface, PRectangle rcPlace,  	enum { xa = 1 }; // gap before start  	int w = static_cast<int>(rcPlace.right - rcPlace.left) - xa - 1; -	bool xStraight = isEndMarker;  // x-mirrored symbol for start marker +	const bool xStraight = isEndMarker;  // x-mirrored symbol for start marker -	int x0 = static_cast<int>(xStraight ? rcPlace.left : rcPlace.right - 1); -	int y0 = static_cast<int>(rcPlace.top); +	const int x0 = static_cast<int>(xStraight ? rcPlace.left : rcPlace.right - 1); +	const int y0 = static_cast<int>(rcPlace.top);  	int dy = static_cast<int>(rcPlace.bottom - rcPlace.top) / 5;  	int y = static_cast<int>(rcPlace.bottom - rcPlace.top) / 2 + dy; @@ -205,7 +205,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,  					// Required because of special way brush is created for selection margin  					// Ensure patterns line up when scrolling with separate margin view  					// by choosing correctly aligned variant. -					bool invertPhase = static_cast<int>(ptOrigin.y) & 1; +					const bool invertPhase = static_cast<int>(ptOrigin.y) & 1;  					surface->FillRectangle(rcSelMargin,  						invertPhase ? *pixmapSelPattern : *pixmapSelPatternOffset1);  				} else { @@ -238,7 +238,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,  			// be displayed until the last of a sequence of whitespace.  			bool needWhiteClosure = false;  			if (vs.ms[margin].mask & SC_MASK_FOLDERS) { -				int level = model.pdoc->GetLevel(model.cs.DocFromDisplay(visibleLine)); +				const int level = model.pdoc->GetLevel(model.cs.DocFromDisplay(visibleLine));  				if (level & SC_FOLDLEVELWHITEFLAG) {  					Sci::Line lineBack = model.cs.DocFromDisplay(visibleLine);  					int levelPrev = level; @@ -380,7 +380,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,  							sprintf(number, "%d", lineDoc + 1);  						if (model.foldFlags & (SC_FOLDFLAG_LEVELNUMBERS | SC_FOLDFLAG_LINESTATE)) {  							if (model.foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { -								int lev = model.pdoc->GetLevel(lineDoc); +								const int lev = model.pdoc->GetLevel(lineDoc);  								sprintf(number, "%c%c %03X %03X",  									(lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_',  									(lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', @@ -388,7 +388,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,  									lev >> 16  									);  							} else { -								int state = model.pdoc->GetLineState(lineDoc); +								const int state = model.pdoc->GetLineState(lineDoc);  								sprintf(number, "%0X", state);  							}  						} | 
