mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1176159 (part 1) - Remove pref_SaveTypes. r=bsmedberg.
Because SAVE_ALL is the only value ever used.
This commit is contained in:
parent
ec9df1cf53
commit
38c2aad78a
@ -960,7 +960,6 @@ Preferences::WritePrefFile(nsIFile* aFile)
|
|||||||
memset(valueArray, 0, gHashTable->EntryCount() * sizeof(char*));
|
memset(valueArray, 0, gHashTable->EntryCount() * sizeof(char*));
|
||||||
pref_saveArgs saveArgs;
|
pref_saveArgs saveArgs;
|
||||||
saveArgs.prefArray = valueArray;
|
saveArgs.prefArray = valueArray;
|
||||||
saveArgs.saveTypes = SAVE_ALL;
|
|
||||||
|
|
||||||
// get the lines that we're supposed to be writing to the file
|
// get the lines that we're supposed to be writing to the file
|
||||||
PL_DHashTableEnumerate(gHashTable, pref_savePref, &saveArgs);
|
PL_DHashTableEnumerate(gHashTable, pref_savePref, &saveArgs);
|
||||||
|
@ -343,11 +343,6 @@ pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg)
|
|||||||
pref->flags & PREF_STICKY_DEFAULT)) {
|
pref->flags & PREF_STICKY_DEFAULT)) {
|
||||||
sourcePref = &pref->userPref;
|
sourcePref = &pref->userPref;
|
||||||
} else {
|
} else {
|
||||||
if (argData->saveTypes == SAVE_ALL_AND_DEFAULTS) {
|
|
||||||
prefPrefix.AssignLiteral("pref(\"");
|
|
||||||
sourcePref = &pref->defaultPref;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
// do not save default prefs that haven't changed
|
// do not save default prefs that haven't changed
|
||||||
return PL_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,9 @@ class PrefSetting;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS };
|
|
||||||
|
|
||||||
// Passed as the arg to pref_savePref
|
// Passed as the arg to pref_savePref
|
||||||
struct pref_saveArgs {
|
struct pref_saveArgs {
|
||||||
char **prefArray;
|
char **prefArray;
|
||||||
pref_SaveTypes saveTypes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PLDHashOperator
|
PLDHashOperator
|
||||||
|
Loading…
Reference in New Issue
Block a user