fixing code that relied on implicit string construction

git-svn-id: svn://10.0.0.236/trunk@78034 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%mozilla.org
2000-09-02 22:13:25 +00:00
parent af6d3927fa
commit 7c24c9b003
2 changed files with 5 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElement::setAttribute(BSTR strAttributeName, VA
// Get the name from the BSTR
USES_CONVERSION;
nsString szName = OLE2W(strAttributeName);
nsString szName(OLE2W(strAttributeName));
// Get the value from the variant
CComVariant vValue;
@@ -91,7 +91,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElement::setAttribute(BSTR strAttributeName, VA
{
return E_INVALIDARG;
}
nsString szValue = OLE2W(vValue.bstrVal);
nsString szValue(OLE2W(vValue.bstrVal));
nsIDOMElement *pIDOMElement = nsnull;
if (FAILED(GetDOMElement(&pIDOMElement)))
@@ -120,7 +120,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElement::getAttribute(BSTR strAttributeName, LO
// Get the name from the BSTR
USES_CONVERSION;
nsString szName = OLE2W(strAttributeName);
nsString szName(OLE2W(strAttributeName));
nsIDOMElement *pIDOMElement = nsnull;
if (FAILED(GetDOMElement(&pIDOMElement)))
@@ -168,7 +168,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElement::removeAttribute(BSTR strAttributeName,
// Get the name from the BSTR
USES_CONVERSION;
nsString szName = OLE2W(strAttributeName);
nsString szName(OLE2W(strAttributeName));
// Remove the attribute
nsresult nr = pIDOMElement->RemoveAttribute(szName);

View File

@@ -80,7 +80,7 @@ CFindComponent::Find(const nsString& searchString,
{
NS_ENSURE_TRUE(mDocShell, NS_ERROR_NOT_INITIALIZED);
nsAutoString matchString = searchString;
nsAutoString matchString(searchString);
if (!caseSensitive)
matchString.ToLowerCase();