From 08af601208d702a1c37dc5a39ef012429b21631c Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Tue, 16 Aug 2005 19:39:42 +0000 Subject: [PATCH] XULRunner-specific bustage fix from bug 299992 - MSVC6 doesn't like initializing reference types as POD, so use a pointer instead. --- xulrunner/app/nsXULRunnerApp.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/xulrunner/app/nsXULRunnerApp.cpp b/xulrunner/app/nsXULRunnerApp.cpp index 31385385b73..7cc139ec640 100644 --- a/xulrunner/app/nsXULRunnerApp.cpp +++ b/xulrunner/app/nsXULRunnerApp.cpp @@ -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",