summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2014-05-21 12:41:01 -0700
committerJohn Abd-El-Malek <jam@chromium.org>2014-05-21 12:41:01 -0700
commita531ead2bd4902863e1de7611997781f2e03c28c (patch)
tree64b27d7439e5788791e2d5ffcac27a26fdf1f805
parenta3f590b60af4bf50c00df4cf9565cc6df0b5667c (diff)
downloadpdfium-a531ead2bd4902863e1de7611997781f2e03c28c.tar.xz
Fix clang warnings so we can treat warnings as errors.
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render.cpp8
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index 0be25e3a79..fba698ca62 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -827,8 +827,8 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
return TRUE;
}
CFX_Matrix deviceCTM = m_pDevice->GetCTM();
- FX_FLOAT scaleX = FXSYS_abs(deviceCTM.a);
- FX_FLOAT scaleY = FXSYS_abs(deviceCTM.d);
+ FX_FLOAT scaleX = FXSYS_fabs(deviceCTM.a);
+ FX_FLOAT scaleY = FXSYS_fabs(deviceCTM.d);
int width = FXSYS_round((FX_FLOAT)rect.Width() * scaleX);
int height = FXSYS_round((FX_FLOAT)rect.Height() * scaleY);
CFX_FxgeDevice bitmap_device;
@@ -911,8 +911,8 @@ CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj, const
left = bbox.left;
top = bbox.top;
CFX_Matrix deviceCTM = m_pDevice->GetCTM();
- FX_FLOAT scaleX = FXSYS_abs(deviceCTM.a);
- FX_FLOAT scaleY = FXSYS_abs(deviceCTM.d);
+ FX_FLOAT scaleX = FXSYS_fabs(deviceCTM.a);
+ FX_FLOAT scaleY = FXSYS_fabs(deviceCTM.d);
int width = FXSYS_round(bbox.Width() * scaleX);
int height = FXSYS_round(bbox.Height() * scaleY);
CFX_DIBitmap* pBackdrop = FX_NEW CFX_DIBitmap;
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 3c08cd62d4..92f631e615 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1420,9 +1420,9 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
}
int level = 0;
if (pSubstFont->m_Charset == FXFONT_SHIFTJIS_CHARSET) {
- level = g_WeightPow_SHIFTJIS[index] * 2 * (FXSYS_abs(ft_matrix.xx) + FXSYS_abs(ft_matrix.xy)) / 36655;
+ level = g_WeightPow_SHIFTJIS[index] * 2 * (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / 36655;
} else {
- level = g_WeightPow_11[index] * (FXSYS_abs(ft_matrix.xx) + FXSYS_abs(ft_matrix.xy)) / 36655;
+ level = g_WeightPow_11[index] * (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / 36655;
}
FXFT_Outline_Embolden(FXFT_Get_Glyph_Outline(m_Face), level);
}