NS_ConvertXXXtoXXX(char) is silly

RESOLVED FIXED in mozilla0.9.6

Status

()

Core
String
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: dbaron, Assigned: jag (Peter Annema))

Tracking

Trunk
mozilla0.9.6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
NS_ConvertASCIItoUCS2(char), NS_ConvertUTF8toUCS2(char), and
NS_ConvertUCS2toUTF8(PRUnichar) are silly.  Why should people use an
ns[C]AutoString to do a conversion that could be done with a cast?  (And
furthermore, a character in UTF8 can't always be represented in a single |char|.)

If someone really wants to do something like this they could use
nsDependent[C]String(&myChar, 1), but would anyone really want to?  Maybe one of
us should try removing those constructors and see if anyone uses these...
(Assignee)

Comment 1

17 years ago
Will have a patch for this soonish. Discovered there's exactly one user, which
we can fix in place.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
(Assignee)

Comment 2

17 years ago
Created attachment 50271 [details] [diff] [review]
Seems we can safely remove this.
(Assignee)

Comment 3

17 years ago
I'll compile this on my Win and Mac boxen and see if anything platform specific
pops up.
(Reporter)

Comment 4

17 years ago
Comment on attachment 50271 [details] [diff] [review]
Seems we can safely remove this.

r=dbaron (assuming you've done the testing above)
Attachment #50271 - Flags: review+
(Assignee)

Comment 5

17 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.