summaryrefslogtreecommitdiff
path: root/core/include/fxcrt/fx_ext.h
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-11 17:00:48 -0800
committerWei Li <weili@chromium.org>2016-03-11 17:00:48 -0800
commit97da97662417085774f75c26e535c6fbe70266ae (patch)
tree9654be693dfb20b49be80911fa8089ff319757f3 /core/include/fxcrt/fx_ext.h
parent55265016faac358266af280db6c62afa34ce2891 (diff)
downloadpdfium-97da97662417085774f75c26e535c6fbe70266ae.tar.xz
Re-enable MSVC warning 4800 for compiling with chromium_code
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
Diffstat (limited to 'core/include/fxcrt/fx_ext.h')
-rw-r--r--core/include/fxcrt/fx_ext.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 689d8e8fc4..dda6a5c72b 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -60,23 +60,19 @@ inline int FXSYS_toHexDigit(const FX_CHAR c) {
}
inline bool FXSYS_isDecimalDigit(const FX_CHAR c) {
- return std::isdigit(c);
+ return !!std::isdigit(c);
}
inline bool FXSYS_isDecimalDigit(const FX_WCHAR c) {
- return std::iswdigit(c);
+ return !!std::iswdigit(c);
}
inline int FXSYS_toDecimalDigit(const FX_CHAR c) {
- if (!std::isdigit(c))
- return 0;
- return c - '0';
+ return std::isdigit(c) ? c - '0' : 0;
}
inline int FXSYS_toDecimalDigit(const FX_WCHAR c) {
- if (!std::iswdigit(c))
- return 0;
- return c - L'0';
+ return std::iswdigit(c) ? c - L'0' : 0;
}
FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr,