From cab891dc502f86cfc670d9facb2f9fa6708e9dd3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 10 Oct 2012 18:02:57 +0200 Subject: [PATCH] QWindowsKeyMapper: remove dead code As an array of automatic storage duration, 'keyLayout' can never be nullptr, so remove the respective check. Change-Id: I2fb2db8311de55b41a1f9aef7c35341949e38e5a Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowskeymapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index fff7b848b8..eeba99f93b 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -679,7 +679,7 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32 bool QWindowsKeyMapper::isADeadKey(unsigned int vk_key, unsigned int modifiers) { - if (keyLayout && (vk_key < 256) && keyLayout[vk_key]) { + if ((vk_key < 256) && keyLayout[vk_key]) { for (register size_t i = 0; i < NumMods; ++i) { if (uint(ModsTbl[i]) == modifiers) return bool(keyLayout[vk_key]->deadkeys & 1<