diff options
author | Neil <nyamatongwe@gmail.com> | 2013-09-10 14:44:16 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-09-10 14:44:16 +1000 |
commit | 8ba6c4c8e180b7506d1cb4f012aac253b3da6750 (patch) | |
tree | 6dc045ba14aecf731b1522610bfc164068519ec1 /win32/PlatWin.cxx | |
parent | 8972cd49a9cb27f21adcb99b5b12a3791de26c34 (diff) | |
download | scintilla-mirror-8ba6c4c8e180b7506d1cb4f012aac253b3da6750.tar.gz |
Use C++ struct initialization {} so can drop -Wno-missing-braces setting for gcc.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 0c690fd7c..3f8c32eb6 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -212,8 +212,7 @@ struct FormatAndMetrics { }; HFONT FormatAndMetrics::HFont() { - LOGFONTW lf; - memset(&lf, 0, sizeof(lf)); + LOGFONTW lf = {}; #if defined(USE_D2D) if (technology == SCWIN_TECH_GDI) { if (0 == ::GetObjectW(hfont, sizeof(lf), &lf)) { @@ -782,7 +781,7 @@ void SurfaceGDI::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fil int height = rc.Height(); // Ensure not distorted too much by corners when small cornerSize = Platform::Minimum(cornerSize, (Platform::Minimum(width, height) / 2) - 2); - BITMAPINFO bpih = {sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}; + BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}}; void *image = 0; HBITMAP hbmMem = CreateDIBSection(reinterpret_cast<HDC>(hMemDC), &bpih, DIB_RGB_COLORS, &image, NULL, 0); @@ -845,7 +844,7 @@ void SurfaceGDI::DrawRGBAImage(PRectangle rc, int width, int height, const unsig rc.top += static_cast<int>((rc.Height() - height) / 2); rc.bottom = rc.top + height; - BITMAPINFO bpih = {sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}; + BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}}; unsigned char *image = 0; HBITMAP hbmMem = CreateDIBSection(reinterpret_cast<HDC>(hMemDC), &bpih, DIB_RGB_COLORS, reinterpret_cast<void **>(&image), NULL, 0); |