From a4396ff7b491f3f7639a19c6d6c6f5886302af7c Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Fri, 11 Jun 2004 15:05:29 +0000 Subject: [PATCH] bug 245673 named literal strings should be const r+sr=darin --- content/xml/document/src/nsXMLContentSink.cpp | 2 +- content/xul/document/src/nsXULContentSink.cpp | 2 +- extensions/webservices/soap/src/nsSOAPMessage.cpp | 4 ++-- js/src/xpconnect/src/xpcconvert.cpp | 4 ++-- js/src/xpconnect/tests/TestXPC.cpp | 2 +- parser/htmlparser/src/nsHTMLTokens.cpp | 2 +- xpcom/string/public/nsLiteralString.h | 8 ++++---- xpfe/components/history/src/nsGlobalHistory.cpp | 12 ++++++------ xpfe/components/history/src/nsGlobalHistory.h | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 349d1b3014f3..7fb59fceecfc 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -1454,7 +1454,7 @@ nsXMLContentSink::PushNameSpacesFrom(const PRUnichar** aAtts) NS_ENSURE_TRUE(nameSpace, NS_ERROR_UNEXPECTED); - static const NS_NAMED_LITERAL_STRING(kNameSpaceDef, "xmlns"); + static NS_NAMED_LITERAL_STRING(kNameSpaceDef, "xmlns"); static const PRUint32 xmlns_len = kNameSpaceDef.Length(); diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index bdbeaea48a4c..d80997641f32 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -1145,7 +1145,7 @@ XULContentSinkImpl::PushNameSpacesFrom(const PRUnichar** aAttributes) return NS_ERROR_OUT_OF_MEMORY; } - static const NS_NAMED_LITERAL_STRING(kNameSpaceDef, "xmlns"); + static NS_NAMED_LITERAL_STRING(kNameSpaceDef, "xmlns"); static const PRUint32 xmlns_len = kNameSpaceDef.Length(); for (; *aAttributes; aAttributes += 2) { diff --git a/extensions/webservices/soap/src/nsSOAPMessage.cpp b/extensions/webservices/soap/src/nsSOAPMessage.cpp index fea52dbfbf06..edc2c9884ef7 100644 --- a/extensions/webservices/soap/src/nsSOAPMessage.cpp +++ b/extensions/webservices/soap/src/nsSOAPMessage.cpp @@ -271,9 +271,9 @@ NS_IMETHODIMP PRUint32 aParameterCount, nsISOAPParameter ** aParameters) { - static const NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr1, + static NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr1, ""); - static const NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr2, + static NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr2, ""); static const nsAString *kEmptySOAPDocStr[] = { &realEmptySOAPDocStr1, &realEmptySOAPDocStr2 diff --git a/js/src/xpconnect/src/xpcconvert.cpp b/js/src/xpconnect/src/xpcconvert.cpp index 138085a559a2..01fec4e99cdb 100644 --- a/js/src/xpconnect/src/xpcconvert.cpp +++ b/js/src/xpconnect/src/xpcconvert.cpp @@ -661,8 +661,8 @@ XPCConvert::JSData2Native(XPCCallContext& ccx, void* d, jsval s, } case nsXPTType::T_DOMSTRING: { - static const NS_NAMED_LITERAL_STRING(sEmptyString, ""); - static const NS_NAMED_LITERAL_STRING(sVoidString, "undefined"); + static NS_NAMED_LITERAL_STRING(sEmptyString, ""); + static NS_NAMED_LITERAL_STRING(sVoidString, "undefined"); const PRUnichar* chars; JSString* str = nsnull; diff --git a/js/src/xpconnect/tests/TestXPC.cpp b/js/src/xpconnect/tests/TestXPC.cpp index aa87f004a046..592a3bba9419 100644 --- a/js/src/xpconnect/tests/TestXPC.cpp +++ b/js/src/xpconnect/tests/TestXPC.cpp @@ -439,7 +439,7 @@ TestArgFormatter(JSContext* jscontext, JSObject* glob, nsIXPConnect* xpc) const char* a_in = "some string"; nsCOMPtr b_in = new nsTestXPCFoo(); nsCOMPtr c_in = do_CreateInstance("@mozilla.org/variant;1"); - static const NS_NAMED_LITERAL_STRING(d_in, "foo bar"); + static NS_NAMED_LITERAL_STRING(d_in, "foo bar"); const char* e_in = "another meaningless chunck of text"; diff --git a/parser/htmlparser/src/nsHTMLTokens.cpp b/parser/htmlparser/src/nsHTMLTokens.cpp index 19dd270b1414..4294df9b203e 100644 --- a/parser/htmlparser/src/nsHTMLTokens.cpp +++ b/parser/htmlparser/src/nsHTMLTokens.cpp @@ -524,7 +524,7 @@ nsresult CTextToken::ConsumeUntil(PRUnichar aChar,PRBool aIgnoreComments,nsScann // assume that the prematured terminal string is the actual terminal string and goto step 1. This // will be our last iteration. - const NS_NAMED_LITERAL_STRING(ltslash, "