From a10aa8dde5ee2b1731461c51105b3cb007d53852 Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Fri, 21 Apr 2000 07:09:51 +0000 Subject: [PATCH] making string conversions explicit --- xpcom/io/nsFileSpec.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xpcom/io/nsFileSpec.cpp b/xpcom/io/nsFileSpec.cpp index e42b44b69ee0..faa19a394ebe 100644 --- a/xpcom/io/nsFileSpec.cpp +++ b/xpcom/io/nsFileSpec.cpp @@ -1146,7 +1146,7 @@ void nsFileSpec::GetFileSystemCharset(nsString & fileSystemCharset) NS_ASSERTION(NS_SUCCEEDED(rv), "error getting platform charset"); if (NS_FAILED(rv)) - aCharset.Assign("ISO-8859-1"); + aCharset.AssignWithConversion("ISO-8859-1"); } fileSystemCharset = aCharset; } @@ -1198,7 +1198,7 @@ void nsFileSpec::GetNativePathString(nsString &nativePathString) { const char *path = GetCString(); if (nsnull == path) { - nativePathString.Assign(""); + nativePathString.SetLength(0); return; } else { @@ -1208,7 +1208,7 @@ void nsFileSpec::GetNativePathString(nsString &nativePathString) delete [] converted; } else - nativePathString.Assign(path); + nativePathString.AssignWithConversion(path); } } @@ -1219,7 +1219,7 @@ void nsFileSpec::GetLeafName(nsString &nativePathString) { char * path = GetLeafName(); if (nsnull == path) { - nativePathString.Assign(""); + nativePathString.SetLength(0); return; } else { PRUnichar *converted = ConvertFromFileSystemCharset(path); @@ -1228,7 +1228,7 @@ void nsFileSpec::GetLeafName(nsString &nativePathString) delete [] converted; } else - nativePathString.Assign(path); + nativePathString.AssignWithConversion(path); nsCRT::free(path); }