From 6bbbd419da4f593fb96caa317e1ab17c437f862e Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Fri, 29 Sep 2000 14:36:46 +0000 Subject: [PATCH] OS/2 Tinderbox breakage Need to make these values really PRUint32 for VisualAge If you guys thought your changes to get gcc to work were bad, wait until you see these git-svn-id: svn://10.0.0.236/trunk@80146 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xul/templates/src/nsXULTemplateBuilder.cpp | 15 ++++++++++----- mozilla/rdf/content/src/nsXULTemplateBuilder.cpp | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp index 7628760604a..4c05d30fa39 100644 --- a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp @@ -4986,7 +4986,8 @@ nsXULTemplateBuilder::ParseAttribute(const nsAReadableString& aAttributeValue, else if (backup != mark && aTextCallback) { // Okay, we've found a variable, and there's some vanilla // text that's been buffered up. Flush it. - (*aTextCallback)(this, Substring(aAttributeValue, mark, backup - mark), aClosure); + (*aTextCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, mark), + NS_STATIC_CAST(PRUint32, backup - mark)), aClosure); } // Construct a substring that is the symbol we need to look up @@ -5012,13 +5013,15 @@ nsXULTemplateBuilder::ParseAttribute(const nsAReadableString& aAttributeValue, if (c != PRUnichar('^')) --i; - (*aVariableCallback)(this, Substring(aAttributeValue, first, last - first), aClosure); + (*aVariableCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, first), + NS_STATIC_CAST(PRUint32, last - first)), aClosure); mark = i + 1; } if (backup != mark && aTextCallback) { // If there's any text left over, then fire the text callback - (*aTextCallback)(this, Substring(aAttributeValue, mark, backup - mark), aClosure); + (*aTextCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, mark), + NS_STATIC_CAST(PRUint32, backup - mark)), aClosure); } } @@ -7475,7 +7478,8 @@ nsXULTemplateBuilder::AddBindingsFor(nsXULTemplateBuilder* aThis, { // We should *only* be recieving "rdf:"-style variables. Make // sure... - if (Substring(aVariable, 0, 4) != NS_LITERAL_STRING("rdf:")) + if (Substring(aVariable, NS_STATIC_CAST(PRUint32, 0), + NS_STATIC_CAST(PRUint32, 4)) != NS_LITERAL_STRING("rdf:")) return; Rule* rule = NS_STATIC_CAST(Rule*, aClosure); @@ -7488,7 +7492,8 @@ nsXULTemplateBuilder::AddBindingsFor(nsXULTemplateBuilder* aThis, // Strip it down to the raw RDF property by clobbering the "rdf:" // prefix - const nsAReadableString& propertyStr = Substring(aVariable, 4, aVariable.Length() - 4); + const nsAReadableString& propertyStr = Substring(aVariable, NS_STATIC_CAST(PRUint32, 4), + aVariable.Length() - 4); nsCOMPtr property; gRDFService->GetUnicodeResource(nsPromiseFlatString(propertyStr), getter_AddRefs(property)); diff --git a/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp b/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp index 7628760604a..4c05d30fa39 100644 --- a/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp +++ b/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp @@ -4986,7 +4986,8 @@ nsXULTemplateBuilder::ParseAttribute(const nsAReadableString& aAttributeValue, else if (backup != mark && aTextCallback) { // Okay, we've found a variable, and there's some vanilla // text that's been buffered up. Flush it. - (*aTextCallback)(this, Substring(aAttributeValue, mark, backup - mark), aClosure); + (*aTextCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, mark), + NS_STATIC_CAST(PRUint32, backup - mark)), aClosure); } // Construct a substring that is the symbol we need to look up @@ -5012,13 +5013,15 @@ nsXULTemplateBuilder::ParseAttribute(const nsAReadableString& aAttributeValue, if (c != PRUnichar('^')) --i; - (*aVariableCallback)(this, Substring(aAttributeValue, first, last - first), aClosure); + (*aVariableCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, first), + NS_STATIC_CAST(PRUint32, last - first)), aClosure); mark = i + 1; } if (backup != mark && aTextCallback) { // If there's any text left over, then fire the text callback - (*aTextCallback)(this, Substring(aAttributeValue, mark, backup - mark), aClosure); + (*aTextCallback)(this, Substring(aAttributeValue, NS_STATIC_CAST(PRUint32, mark), + NS_STATIC_CAST(PRUint32, backup - mark)), aClosure); } } @@ -7475,7 +7478,8 @@ nsXULTemplateBuilder::AddBindingsFor(nsXULTemplateBuilder* aThis, { // We should *only* be recieving "rdf:"-style variables. Make // sure... - if (Substring(aVariable, 0, 4) != NS_LITERAL_STRING("rdf:")) + if (Substring(aVariable, NS_STATIC_CAST(PRUint32, 0), + NS_STATIC_CAST(PRUint32, 4)) != NS_LITERAL_STRING("rdf:")) return; Rule* rule = NS_STATIC_CAST(Rule*, aClosure); @@ -7488,7 +7492,8 @@ nsXULTemplateBuilder::AddBindingsFor(nsXULTemplateBuilder* aThis, // Strip it down to the raw RDF property by clobbering the "rdf:" // prefix - const nsAReadableString& propertyStr = Substring(aVariable, 4, aVariable.Length() - 4); + const nsAReadableString& propertyStr = Substring(aVariable, NS_STATIC_CAST(PRUint32, 4), + aVariable.Length() - 4); nsCOMPtr property; gRDFService->GetUnicodeResource(nsPromiseFlatString(propertyStr), getter_AddRefs(property));