summaryrefslogtreecommitdiff
path: root/fpdfsdk/cfx_systemhandler.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-28 11:04:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 11:04:51 -0700
commit224bc5a983a02c0da3ecc0ee55b6c8b1fe500980 (patch)
treeb6f16086e39be43f5afdb9457886288737c7272b /fpdfsdk/cfx_systemhandler.cpp
parent7322343b9322b93d97077575f95a00dcca3f0451 (diff)
downloadpdfium-224bc5a983a02c0da3ecc0ee55b6c8b1fe500980.tar.xz
Change bool type to fix warnings.chromium/2720
Switching the Is{SHIFT|CTRL|ALT|}KeyDown methods to bool from FX_BOOL generated cfx_systemhandler.cpp(129): warning C4800: 'FX_BOOL': forcing value to bool 'true' or 'false' (performance warning) on the win_chromium_x64_rel_ng and win8_chromium_ng bots. This CL switches back to FX_BOOL. Attempting to move everything to bool has huge ripple effects. I removed IsINSERTKeyDown as it was always false. Review-Url: https://codereview.chromium.org/1929963002
Diffstat (limited to 'fpdfsdk/cfx_systemhandler.cpp')
-rw-r--r--fpdfsdk/cfx_systemhandler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp
index 95a940d1ff..c5f53341e1 100644
--- a/fpdfsdk/cfx_systemhandler.cpp
+++ b/fpdfsdk/cfx_systemhandler.cpp
@@ -126,17 +126,13 @@ FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() {
}
bool CFX_SystemHandler::IsSHIFTKeyDown(uint32_t nFlag) const {
- return m_pEnv->FFI_IsSHIFTKeyDown(nFlag);
+ return !!m_pEnv->FFI_IsSHIFTKeyDown(nFlag);
}
bool CFX_SystemHandler::IsCTRLKeyDown(uint32_t nFlag) const {
- return m_pEnv->FFI_IsCTRLKeyDown(nFlag);
+ return !!m_pEnv->FFI_IsCTRLKeyDown(nFlag);
}
bool CFX_SystemHandler::IsALTKeyDown(uint32_t nFlag) const {
- return m_pEnv->FFI_IsALTKeyDown(nFlag);
-}
-
-bool CFX_SystemHandler::IsINSERTKeyDown(uint32_t nFlag) const {
- return m_pEnv->FFI_IsINSERTKeyDown(nFlag);
+ return !!m_pEnv->FFI_IsALTKeyDown(nFlag);
}