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

Unified Diff: xfa/src/fwl/src/theme/widgettp.cpp

Issue 1512423003: Convert last batch of casts in fwl. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: xfa/src/fwl/src/theme/widgettp.cpp
diff --git a/xfa/src/fwl/src/theme/widgettp.cpp b/xfa/src/fwl/src/theme/widgettp.cpp
index 7db0f7ea225e4ca69455e6765c5fbddf752248da..959746761e47dcca5e55a840d7df3239630d84eb 100644
--- a/xfa/src/fwl/src/theme/widgettp.cpp
+++ b/xfa/src/fwl/src/theme/widgettp.cpp
@@ -742,19 +742,16 @@ FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
}
CFWL_FontManager::CFWL_FontManager() {}
CFWL_FontManager::~CFWL_FontManager() {
- int32_t count = m_arrFonts.GetSize();
- for (int32_t i = 0; i < count; i++) {
- CFWL_FontData* data = (CFWL_FontData*)m_arrFonts[i];
- delete data;
+ for (int32_t i = 0; i < m_arrFonts.GetSize(); i++) {
+ delete static_cast<CFWL_FontData*>(m_arrFonts[i]);
}
m_arrFonts.RemoveAll();
}
IFX_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD wCodePage) {
- int32_t count = m_arrFonts.GetSize();
- for (int32_t i = 0; i < count; i++) {
- CFWL_FontData* data = (CFWL_FontData*)m_arrFonts[i];
+ for (int32_t i = 0; i < m_arrFonts.GetSize(); i++) {
+ CFWL_FontData* data = static_cast<CFWL_FontData*>(m_arrFonts[i]);
if (data->Equal(wsFontFamily, dwFontStyles, wCodePage)) {
return data->GetFont();
}
« xfa/src/fwl/src/lightwidget/widget.cpp ('K') | « xfa/src/fwl/src/lightwidget/widget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698