diff options
Diffstat (limited to 'updater/conf_dialog.cpp')
-rw-r--r-- | updater/conf_dialog.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/updater/conf_dialog.cpp b/updater/conf_dialog.cpp index a0d734b..9c6bdba 100644 --- a/updater/conf_dialog.cpp +++ b/updater/conf_dialog.cpp @@ -65,12 +65,12 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP // items.
lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_NORECOMPUTE;// | LVIF_IMAGE;
- UpdateList *todo = (UpdateList *)lParam;
- for(todo->reset(); todo->current(); todo->next()) {
+ UpdateList &todo = *(UpdateList *)lParam;
+ for(int i=0; i<todo.getCount(); ++i) {
lvI.mask = LVIF_TEXT | LVIF_PARAM;// | LVIF_IMAGE;
lvI.iSubItem = 0;
- lvI.lParam = (LPARAM)todo->current();
- lvI.pszText = TranslateTS(temp_str = GetTString(todo->current()->update.szComponentName));
+ lvI.lParam = (LPARAM)&todo[i];
+ lvI.pszText = TranslateTS(temp_str = GetTString(todo[i].update.szComponentName));
lvI.iItem = ListView_InsertItem(GetDlgItem(hwndDlg, IDC_LIST_UPDATES), &lvI);
free(temp_str);
@@ -93,9 +93,9 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP // remember whether the user has decided not to update this component with this particular new version
char stored_setting[256];
- mir_snprintf(stored_setting, 256, "DisabledVer%s", todo->current()->update.szComponentName);
+ mir_snprintf(stored_setting, 256, "DisabledVer%s", todo[i].update.szComponentName);
DBVARIANT dbv;
- bool check = todo->current()->update_options.enabled;
+ bool check = todo[i].update_options.enabled;
if(!DBGetContactSetting(0, "Updater", stored_setting, &dbv)) {
if(dbv.pszVal && strcmp(dbv.pszVal, ((UpdateInternal *)lvI.lParam)->newVersion) == 0)
check = false;
@@ -146,10 +146,10 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP //ListView_SetItem(GetDlgItem(hwndDlg, IDC_LIST_UPDATES), &lvI);
- UpdateList *todo = (UpdateList *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ UpdateList &todo = *(UpdateList *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
bool enableOk = false;
- for(todo->reset(); todo->current(); todo->next()) {
- if(todo->current()->update_options.enabled) {
+ for(int i=0; i<todo.getCount(); ++i) {
+ if(todo[i].update_options.enabled) {
enableOk = true;
break;
}
|