Change implicit conversion from

|NS_ConvertUTF8toUCS2|
|NS_ConvertASCIItoUCS2|
|NS_ConvertUCS2toUTF8|
|ns[C]LiteralString|
|ns[C]PromiseFlatString|

to explicit |get()|.

Add |get()| to |nsString|, remove implicit conversion operators where                                                                                            possible, add NS_WARNING where not (yet!).

Bug=53057, r=alecf, sr=scc
This commit is contained in:
disttsc%bart.nl 2001-03-08 09:17:11 +00:00
Родитель 06518dfdec
Коммит daf988026e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1065,9 +1065,9 @@ nsProfileAccess::Get4xProfileInfo(const char *registryName)
// 4.x profiles coming from japanese machine are already in unicode.
// So, there is no need to decode into unicode further.
nsCAutoString temp;
temp = (const char*) NS_ConvertUCS2toUTF8(profile);
NS_ConvertUCS2toUTF8 temp(profile);
nsCAutoString profileName(nsUnescape( NS_CONST_CAST(char*, temp.get())));
nsAutoString convertedProfName((const PRUnichar*) NS_ConvertUTF8toUCS2(profileName));
nsAutoString convertedProfName(NS_ConvertUTF8toUCS2(profileName).get());
#else
nsCAutoString temp; temp.AssignWithConversion(profile);
@ -1549,7 +1549,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe
{
rv = NS_NewLocalFile(nsnull, PR_TRUE, getter_AddRefs(tempLocal));
if (NS_SUCCEEDED(rv))
rv = tempLocal->SetPersistentDescriptor(NS_ConvertUCS2toUTF8(regLocationData));
rv = tempLocal->SetPersistentDescriptor(NS_ConvertUCS2toUTF8(regLocationData).get());
}
else
#endif