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

Unified Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1783023002: Re-enable MSVC warning 4800 for compiling with chromium_code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove cast change on security_handler file Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/agg/fx_agg_driver.cpp ('k') | fpdfsdk/include/fsdk_baseannot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index cd46148b7f101b842513c36e900bd4a0fa6dc085..2ad1e5c9de918c5fd0f03e793e51144f98512a32 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -387,19 +387,20 @@ int32_t GetSimilarValue(int weight,
int pitch_family,
FX_DWORD style) {
int32_t iSimilarValue = 0;
- if ((style & FXFONT_BOLD) == (weight > 400)) {
+ if (!!(style & FXFONT_BOLD) == (weight > 400)) {
iSimilarValue += 16;
}
- if ((style & FXFONT_ITALIC) == bItalic) {
+ if (!!(style & FXFONT_ITALIC) == bItalic) {
iSimilarValue += 16;
}
- if ((style & FXFONT_SERIF) == (pitch_family & FXFONT_FF_ROMAN)) {
+ if (!!(style & FXFONT_SERIF) == !!(pitch_family & FXFONT_FF_ROMAN)) {
iSimilarValue += 16;
}
- if ((style & FXFONT_SCRIPT) == (pitch_family & FXFONT_FF_SCRIPT)) {
+ if (!!(style & FXFONT_SCRIPT) == !!(pitch_family & FXFONT_FF_SCRIPT)) {
iSimilarValue += 8;
}
- if ((style & FXFONT_FIXED_PITCH) == (pitch_family & FXFONT_FF_FIXEDPITCH)) {
+ if (!!(style & FXFONT_FIXED_PITCH) ==
+ !!(pitch_family & FXFONT_FF_FIXEDPITCH)) {
iSimilarValue += 8;
}
return iSimilarValue;
« no previous file with comments | « core/src/fxge/agg/fx_agg_driver.cpp ('k') | fpdfsdk/include/fsdk_baseannot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698