mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-30 01:37:50 +00:00
fix(developer): compiler mismatch on currentLine
Fixes #7122. The compiler was updating currentLine when checking for unreachable rules, but not restoring it afterwards. This led to mismatches in the debugger and in compiler warnings.
This commit is contained in:
parent
fc21e8359e
commit
5a48e96bb2
2 changed files with 6 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ BOOL CheckForDeprecatedFeatures(PFILE_KEYBOARD fk) {
|
|||
// Keyman 7
|
||||
#define TSS_WINDOWSLANGUAGES 29
|
||||
*/
|
||||
int currentLineBackup = currentLine;
|
||||
int oldCurrentLine = currentLine;
|
||||
DWORD i;
|
||||
PFILE_STORE sp;
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ BOOL CheckForDeprecatedFeatures(PFILE_KEYBOARD fk) {
|
|||
}
|
||||
}
|
||||
|
||||
currentLine = currentLineBackup;
|
||||
currentLine = oldCurrentLine;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ DWORD VerifyUnreachableRules(PFILE_GROUP gp) {
|
|||
PFILE_KEY kp = gp->dpKeyArray;
|
||||
DWORD i;
|
||||
|
||||
int oldCurrentLine = currentLine;
|
||||
|
||||
std::unordered_map<std::wstring, FILE_KEY> map;
|
||||
std::unordered_set<int> reportedLines;
|
||||
|
||||
|
|
@ -44,5 +46,7 @@ DWORD VerifyUnreachableRules(PFILE_GROUP gp) {
|
|||
}
|
||||
}
|
||||
|
||||
currentLine = oldCurrentLine;
|
||||
|
||||
return CERR_None;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue