OSDN Git Service

Add const modifiers to arguments and bHookApp in CXkeymacsDll::SetModifierState.
authorKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Tue, 21 Jun 2011 06:19:30 +0000 (15:19 +0900)
committerKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Tue, 21 Jun 2011 06:19:30 +0000 (15:19 +0900)
xkeymacsdll/xkeymacsdll.cpp
xkeymacsdll/xkeymacsdll.h

index ae30ac1..7fb7dbf 100644 (file)
@@ -456,7 +456,7 @@ UINT CXkeymacsDll::GetModifierState(BOOL bPhysicalKey)
        return result;\r
 }\r
 \r
-void CXkeymacsDll::SetModifierState(UINT after, UINT before)\r
+void CXkeymacsDll::SetModifierState(const UINT after, const UINT before)\r
 {\r
        if (after & SHIFT && !(before & SHIFT))\r
                DepressKey(VK_SHIFT);\r
@@ -471,7 +471,7 @@ void CXkeymacsDll::SetModifierState(UINT after, UINT before)
                UpdateKeyboardState(VK_CONTROL, 0);\r
        }\r
 \r
-       BOOL bHookApp = CUtils::IsVisualCpp() || CUtils::IsFirefox() || CUtils::IsVisualStudio() || CUtils::IsInternetExplorer();\r
+       const BOOL bHookApp = CUtils::IsVisualCpp() || CUtils::IsFirefox() || CUtils::IsVisualStudio() || CUtils::IsInternetExplorer();\r
        if (after & META && !(before & META)) {\r
                if (bHookApp)\r
                        m_nHookAltRelease |= HOOK_ALT_LATER;\r
index 006eac4..62700ee 100644 (file)
@@ -98,7 +98,7 @@ public:
        static CClipboardSnap* GetKillRing(CClipboardSnap *pSnap, BOOL bForce = TRUE);\r
        static void IncreaseKillRingIndex(int nKillRing = 1);\r
        static UINT GetModifierState(BOOL bPhysicalKey = TRUE);\r
-       static void SetModifierState(UINT before, UINT after);\r
+       static void SetModifierState(const UINT before, const UINT after);\r
        static BOOL IsDown(BYTE bVk, BOOL bPhysicalKey = TRUE);\r
        static void Kdu(BYTE bVk, DWORD n = 1, BOOL bOriginal = TRUE);\r
        static void ReleaseKey(BYTE bVk);\r