Closed Bug 170339 Opened 22 years ago Closed 3 years ago

code cleanup: string usage

Categories

(Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: shanjian, Unassigned)

Details

(Keywords: intl)

urg. this patch is bad. it uses AssignWithConversion, which should no longer be
used, and uses nsString as function argument.

It should use a more general type as the argument (nsAString seems appropriate).
as for
+        oCharset.AssignWithConversion("UTF-8"); 

it would be better written as:
oCharset.Assign(NS_LITERAL_STRING("UTF-8"));
which can also be faster, if the compiler supports doing the conversion at
compile time.

oh yeah, one more thing:
+ return oCharset.Length() > 0;

can be written as:
return !oCharset.IsEmpty();

which can be faster.

There are at least 2 places need to be changed. 
nsParser.cpp
mozilla/content/base/src/nsScriptLoader.cpp
accept
Status: NEW → ASSIGNED
code issue, QA to yokoyama@netscape.com for now.
Keywords: intl
QA Contact: ruixu → yokoyama
shanjian is no longer working on mozilla for 2 years and these bugs are still
here. Mark them won't fix. If you want to reopen it, find a good owner first. 
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
Mass Re-open of Frank Tangs Won't fix debacle. Spam is his responsibility not my own
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Mass Re-assinging Frank Tangs old bugs that he closed won't fix and had to be
re-open. Spam is his fault not my own
Assignee: shanjian → nobody
Status: REOPENED → NEW
QA Contact: tetsuroy → i18n

this doesn't seem relevant anymore.

Status: NEW → RESOLVED
Closed: 19 years ago3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.