mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
XULRunner-specific bustage fix from bug 299992 - MSVC6 doesn't like initializing reference types as POD, so use a pointer instead.
This commit is contained in:
parent
9f9cca5b2a
commit
1c23a3fc0f
@ -187,24 +187,25 @@ static int LoadAppData(const char* appDataFile, nsXREAppData* aResult,
|
||||
PRUint32 i;
|
||||
|
||||
// Read string-valued fields
|
||||
const struct {
|
||||
const struct
|
||||
{
|
||||
const char *key;
|
||||
const char **fill;
|
||||
nsCString &buf;
|
||||
nsCString *buf;
|
||||
PRBool required;
|
||||
} string_fields[] = {
|
||||
{ "Vendor", &aResult->vendor, vendor, PR_FALSE },
|
||||
{ "Name", &aResult->name, name, PR_TRUE },
|
||||
{ "Version", &aResult->version, version, PR_FALSE },
|
||||
{ "BuildID", &aResult->buildID, buildID, PR_TRUE },
|
||||
{ "ID", &aResult->ID, appID, PR_FALSE },
|
||||
{ "Copyright", &aResult->copyright, copyright, PR_FALSE }
|
||||
{ "Vendor", &aResult->vendor, &vendor, PR_FALSE },
|
||||
{ "Name", &aResult->name, &name, PR_TRUE },
|
||||
{ "Version", &aResult->version, &version, PR_FALSE },
|
||||
{ "BuildID", &aResult->buildID, &buildID, PR_TRUE },
|
||||
{ "ID", &aResult->ID, &appID, PR_FALSE },
|
||||
{ "Copyright", &aResult->copyright, ©right, PR_FALSE }
|
||||
};
|
||||
for (i = 0; i < NS_ARRAY_LENGTH(string_fields); ++i) {
|
||||
rv = parser.GetString("App", string_fields[i].key,
|
||||
string_fields[i].buf);
|
||||
*string_fields[i].buf);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*string_fields[i].fill = string_fields[i].buf.get();
|
||||
*string_fields[i].fill = string_fields[i].buf->get();
|
||||
}
|
||||
else if (string_fields[i].required) {
|
||||
Output(PR_TRUE, "Error: %x: No \"%s\" field.\n",
|
||||
|
Loading…
Reference in New Issue
Block a user