aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-03 13:30:18 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-03 13:30:18 +1000
commit8bc5ddbe103f6e34538f0cbe9569201e0a5531ec (patch)
treef60cd26108bfd60fa338a43d430f3797b3bf25f2 /src/ViewStyle.cxx
parentc6aab7142f462eaeab3fd517f9d876da835b0853 (diff)
downloadscintilla-mirror-8bc5ddbe103f6e34538f0cbe9569201e0a5531ec.tar.gz
Using casts and an alternate PRectangle constructor to make XYPOSITION <-> int
conversions and other conversions more consistent.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index b1c9dc10b..af808f3c1 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -75,12 +75,12 @@ 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 = surface.DeviceHeightFont(sizeZoomed);
+ 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);
font.Create(fp);
- ascent = surface.Ascent(font);
- descent = surface.Descent(font);
+ ascent = static_cast<unsigned int>(surface.Ascent(font));
+ descent = static_cast<unsigned int>(surface.Descent(font));
aveCharWidth = surface.AverageCharWidth(font);
spaceWidth = surface.WidthChar(font, ' ');
}
@@ -347,7 +347,7 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
controlCharWidth = 0.0;
if (controlCharSymbol >= 32) {
- controlCharWidth = surface.WidthChar(styles[STYLE_CONTROLCHAR].font, controlCharSymbol);
+ controlCharWidth = surface.WidthChar(styles[STYLE_CONTROLCHAR].font, static_cast<char>(controlCharSymbol));
}
fixedColumnWidth = marginInside ? leftMarginWidth : 0;