#13 Missed things and a suggestion

open
5
2009-08-08
2009-08-08
Jonas
No

File: Compare-plugin\src\Compare.cpp
Location area: 'void alignMatches()'
------
From:
CheckMenuItem(hMenu, funcItem[6]._cmdID, MF_BYCOMMAND | (Settings.AddLine ? MF_CHECKED : MF_UNCHECKED));
To:
CheckMenuItem(hMenu, funcItem[CMD_ALIGN_MATCHES]._cmdID, MF_BYCOMMAND | (Settings.AddLine ? MF_CHECKED : MF_UNCHECKED));

------
From:
CheckMenuItem(hMenu, funcItem[7]._cmdID, MF_BYCOMMAND | (Settings.IncludeSpace ? MF_CHECKED : MF_UNCHECKED));
To:
CheckMenuItem(hMenu, funcItem[CMD_IGNORE_SPACING]._cmdID, MF_BYCOMMAND | (Settings.IncludeSpace ? MF_CHECKED : MF_UNCHECKED));

------
From:
CheckMenuItem(hMenu, funcItem[8]._cmdID, MF_BYCOMMAND | (Settings.DetectMove ? MF_CHECKED : MF_UNCHECKED));
To:
CheckMenuItem(hMenu, funcItem[CMD_DETECT_MOVES]._cmdID, MF_BYCOMMAND | (Settings.DetectMove ? MF_CHECKED : MF_UNCHECKED));
------

alternative delete method suggestion:
in function: 'BOOL APIENTRY DllMain(...)'
At: case DLL_PROCESS_DETACH:
----
From:
delete funcItem[0]._pShKey;
delete funcItem[1]._pShKey;
delete funcItem[3]._pShKey;
delete funcItem[4]._pShKey;
To:
for (int i = 0; i < NB_MENU_COMMANDS; i++)
{
if (funcItem[i]._pShKey != NULL)
delete funcItem[i]._pShKey;
}

-----

Discussion