aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
commit1b808ad6a4e623c564513a72cedc17581426942f (patch)
treef0671c60ec9680f4c4d2e9f7e8c85028b833b0cf /src/ViewStyle.cxx
parent13f7cab5a5894313d2245ae56d6f2e7b1f0d7307 (diff)
downloadscintilla-mirror-1b808ad6a4e623c564513a72cedc17581426942f.tar.gz
Backport: Mark variables as const where simple.
Backport of changeset 6470:d78a4b522662.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index c2d5effcd..63a866b37 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -71,8 +71,8 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, cons
if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1
sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER;
- float deviceHeight = static_cast<float>(surface.DeviceHeightFont(sizeZoomed));
- FontParameters fp(fs.fontName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, fs.weight, fs.italic, fs.extraFontFlag, technology, fs.characterSet);
+ const float deviceHeight = static_cast<float>(surface.DeviceHeightFont(sizeZoomed));
+ const FontParameters fp(fs.fontName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, fs.weight, fs.italic, fs.extraFontFlag, technology, fs.characterSet);
font.Create(fp);
ascent = static_cast<unsigned int>(surface.Ascent(font));
@@ -377,7 +377,7 @@ void ViewStyle::ReleaseAllExtendedStyles() {
}
int ViewStyle::AllocateExtendedStyles(int numberStyles) {
- int startRange = static_cast<int>(nextExtendedStyle);
+ const int startRange = static_cast<int>(nextExtendedStyle);
nextExtendedStyle += numberStyles;
EnsureStyle(nextExtendedStyle);
for (size_t i=startRange; i<nextExtendedStyle; i++) {