Closed Bug 13210 Opened 25 years ago Closed 25 years ago

nsCString::Append(PRInt32 aInteger, PRInt32 aRadix) uses sprintf()

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: waterson, Assigned: rickg)

References

()

Details

Ack! This calls sprintf()! Bad bad evil! sprintf() is notoriously slow because it needs to parse the format string. For this case, we should write a custom implementation that converts an integer to characters inline.
Status: NEW → ASSIGNED
We already have such a beast, and I'll make the conversion. Float has the same problem, but I don't plan to write a float to string operator.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed by implementing a quick int to string function.
Component: XP Miscellany → String
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.