aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-04-04 13:35:59 +0000
committernyamatongwe <unknown>2000-04-04 13:35:59 +0000
commit416476290c88d15ac7297989f77fac50f5c9fcef (patch)
tree3dced34d6c9f802d7e075554cea761616ce69c8b /win32/PlatWin.cxx
parent42799425f8c02442df8b1af1a024a3fe8fa6e93f (diff)
downloadscintilla-mirror-416476290c88d15ac7297989f77fac50f5c9fcef.tar.gz
Avoid lots of warnings from Borland C++.
Changed name of interface class defined in Accessor.h to Accessor.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 17ca7cc03..63dd56648 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -101,12 +101,12 @@ void Palette::Allocate(Window &) {
char *pal = new char[sizeof(LOGPALETTE) + (used-1) * sizeof(PALETTEENTRY)];
LOGPALETTE *logpal = reinterpret_cast<LOGPALETTE *>(pal);
logpal->palVersion = 0x300;
- logpal->palNumEntries = used;
+ logpal->palNumEntries = static_cast<WORD>(used);
for (int iPal=0;iPal<used;iPal++) {
Colour desired = entries[iPal].desired;
- logpal->palPalEntry[iPal].peRed = desired.GetRed();
- logpal->palPalEntry[iPal].peGreen = desired.GetGreen();
- logpal->palPalEntry[iPal].peBlue = desired.GetBlue();
+ logpal->palPalEntry[iPal].peRed = static_cast<BYTE>(desired.GetRed());
+ logpal->palPalEntry[iPal].peGreen = static_cast<BYTE>(desired.GetGreen());
+ logpal->palPalEntry[iPal].peBlue = static_cast<BYTE>(desired.GetBlue());
entries[iPal].allocated =
PALETTERGB(desired.GetRed(), desired.GetGreen(), desired.GetBlue());
// PC_NOCOLLAPSE means exact colours allocated even when in background this means other windows
@@ -135,7 +135,7 @@ void Font::Create(const char *faceName, int size, bool bold, bool italic) {
// The negative is to allow for leading
lf.lfHeight = -(abs(size));
lf.lfWeight = bold ? FW_BOLD : FW_NORMAL;
- lf.lfItalic = italic ? 1 : 0;
+ lf.lfItalic = static_cast<BYTE>(italic ? 1 : 0);
lf.lfCharSet = DEFAULT_CHARSET;
strcpy(lf.lfFaceName, faceName);