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

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: 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
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..1ab1f5dec3668f8cb1f858904388441e26ab4dfe 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -387,19 +387,22 @@ 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) != 0) == (weight > 400)) {
Tom Sepez 2016/03/11 00:30:29 again, !!
Wei Li 2016/03/11 04:11:36 Done.
iSimilarValue += 16;
}
- if ((style & FXFONT_ITALIC) == bItalic) {
+ if (((style & FXFONT_ITALIC) != 0) == bItalic) {
iSimilarValue += 16;
}
- if ((style & FXFONT_SERIF) == (pitch_family & FXFONT_FF_ROMAN)) {
+ if (((style & FXFONT_SERIF) != 0) ==
+ ((pitch_family & FXFONT_FF_ROMAN) != 0)) {
Tom Sepez 2016/03/11 00:30:29 Ooops. FXFONT_FF_ROMAN is (1 << 4), and FXFONT_SE
Wei Li 2016/03/11 04:11:36 Acknowledged.
iSimilarValue += 16;
}
- if ((style & FXFONT_SCRIPT) == (pitch_family & FXFONT_FF_SCRIPT)) {
+ if (((style & FXFONT_SCRIPT) != 0) ==
Tom Sepez 2016/03/11 00:30:29 FXFONT_SCRIPT is 8, FXFONT_FF_SCRIPT is (4 << 4).
Wei Li 2016/03/11 04:11:36 Acknowledged.
+ ((pitch_family & FXFONT_FF_SCRIPT) != 0)) {
iSimilarValue += 8;
}
- if ((style & FXFONT_FIXED_PITCH) == (pitch_family & FXFONT_FF_FIXEDPITCH)) {
+ if (((style & FXFONT_FIXED_PITCH) != 0) ==
Tom Sepez 2016/03/11 00:30:29 check this too. Anyway, I think your changes more
Wei Li 2016/03/11 04:11:36 Acknowledged.
+ ((pitch_family & FXFONT_FF_FIXEDPITCH) != 0)) {
iSimilarValue += 8;
}
return iSimilarValue;

Powered by Google App Engine
This is Rietveld 408576698