if you want a pointer to the characters, you're going to have to |.get()| it

This commit is contained in:
scc%mozilla.org 2000-09-13 07:11:08 +00:00
Родитель 61f79884f1
Коммит 5acad16fdf
2 изменённых файлов: 9 добавлений и 6 удалений

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

@ -93,10 +93,10 @@ public:
const PRUnichar* notes, PRBool isMailList, nsAbAutoCompleteSession::MatchType type)
{
NS_INIT_REFCNT();
mNickName = nsCRT::strdup(nickName ? nickName : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("")));
mUserName = nsCRT::strdup(userName ? userName : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("")));
mEmailAddress = nsCRT::strdup(emailAddress ? emailAddress : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("")));
mNotes = nsCRT::strdup(notes ? notes : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("")));
mNickName = nsCRT::strdup(nickName ? nickName : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("").get()));
mUserName = nsCRT::strdup(userName ? userName : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("").get()));
mEmailAddress = nsCRT::strdup(emailAddress ? emailAddress : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("").get()));
mNotes = nsCRT::strdup(notes ? notes : NS_STATIC_CAST(const PRUnichar*, NS_LITERAL_STRING("").get()));
mIsMailList = isMailList;
mType = type;
}

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

@ -2917,7 +2917,8 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng
nsAutoString bytesStr; bytesStr.AppendInt(mBytesReceived);
const PRUnichar *formatStrings[] = { bytesStr.GetUnicode() };
const PRUnichar *propertyTag = NS_LITERAL_STRING("bytesReceived");
NS_NAMED_LITERAL_STRING(literalPropertyTag, "bytesReceived");
const PRUnichar *propertyTag = literalPropertyTag.get();
rv = bundle->FormatStringFromName(propertyTag,
formatStrings, 1,
getter_Copies(statusString));
@ -3674,7 +3675,9 @@ PRInt32 nsNNTPProtocol::DisplayNewsRC()
nsAutoString totalGroupStr; totalGroupStr.AppendInt((long) m_newsRCListCount);
const PRUnichar *formatStrings[] = { thisGroupStr.GetUnicode(),totalGroupStr.GetUnicode() };
const PRUnichar *propertyTag = NS_LITERAL_STRING("checkingForNewNews");
NS_NAMED_LITERAL_STRING(literalPropertyTag, "checkingForNewNews");
const PRUnichar *propertyTag = literalPropertyTag.get();
rv = bundle->FormatStringFromName(propertyTag,
formatStrings, 2,
getter_Copies(statusString));