Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: core/src/fxge/win32/fx_win32_device.cpp

Issue 792953005: Resolve all but two VC++ build warnings in pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Only do warnings-as-errors on 32-bit builds. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« build/standalone.gypi ('K') | « core/src/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
9 #include "../../../include/fxge/fx_ge_win32.h" 9 #include "../../../include/fxge/fx_ge_win32.h"
10 #include <crtdbg.h> 10 #include <crtdbg.h>
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return FX_NEW CWin32FontInfo; 396 return FX_NEW CWin32FontInfo;
397 } 397 }
398 void CFX_GEModule::InitPlatform() 398 void CFX_GEModule::InitPlatform()
399 { 399 {
400 CWin32Platform* pPlatformData = FX_NEW CWin32Platform; 400 CWin32Platform* pPlatformData = FX_NEW CWin32Platform;
401 if (!pPlatformData) { 401 if (!pPlatformData) {
402 return; 402 return;
403 } 403 }
404 OSVERSIONINFO ver; 404 OSVERSIONINFO ver;
405 ver.dwOSVersionInfoSize = sizeof(ver); 405 ver.dwOSVersionInfoSize = sizeof(ver);
406 #pragma warning(suppress : 4996) // Suppress deprecation warning
406 GetVersionEx(&ver); 407 GetVersionEx(&ver);
407 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5; 408 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5;
408 pPlatformData->m_GdiplusExt.Load(); 409 pPlatformData->m_GdiplusExt.Load();
409 m_pPlatformData = pPlatformData; 410 m_pPlatformData = pPlatformData;
410 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 411 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
411 } 412 }
412 void CFX_GEModule::DestroyPlatform() 413 void CFX_GEModule::DestroyPlatform()
413 { 414 {
414 if (m_pPlatformData) { 415 if (m_pPlatformData) {
415 delete (CWin32Platform*)m_pPlatformData; 416 delete (CWin32Platform*)m_pPlatformData;
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 if (m_hDC) { 1210 if (m_hDC) {
1210 SelectObject(m_hDC, m_hOldBitmap); 1211 SelectObject(m_hDC, m_hOldBitmap);
1211 DeleteDC(m_hDC); 1212 DeleteDC(m_hDC);
1212 } 1213 }
1213 if (m_hBitmap) { 1214 if (m_hBitmap) {
1214 DeleteObject(m_hBitmap); 1215 DeleteObject(m_hBitmap);
1215 } 1216 }
1216 delete GetBitmap(); 1217 delete GetBitmap();
1217 } 1218 }
1218 #endif 1219 #endif
OLDNEW
« build/standalone.gypi ('K') | « core/src/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698