Closed Bug 1667957 Opened 5 years ago Closed 5 years ago

Provide functions that convert an integer to a decimal nsAutoTString

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: sg, Assigned: sg)

Details

Attachments

(2 files)

There are several places in the code where a string representation of an integer is needed, either as a standalone or for concatenating. Such code could be simplified if we had functions converting to a string rather than needing to construct an empty string, and then append to it.

nsPrintfCString("%d", integer)?

Well, yes. but isn't a nsPrintfCString much less efficient?

Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b9081a6e594 Provide functions that convert an integer to a decimal nsAutoTString. r=xpcom-reviewers,nika

I have a fix. The new functions need to be moved over to nsString.h to avoid a include dependency cycle.

Flags: needinfo?(sgiesecke)
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ec9d975f5bc3 Provide functions that convert an integer to a decimal nsAutoTString. r=xpcom-reviewers,nika
Attachment #9178418 - Attachment description: Bug 1667957 - Use new ToAutoCString functions in dom/quota and its clients. r=#dom-workers-and-storage → Bug 1667957 - Use new IntTo(C)String functions in dom/quota and its clients. r=#dom-workers-and-storage
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9c57fe43df1 Use new IntTo(C)String functions in dom/quota and its clients. r=dom-workers-and-storage-reviewers,ttung
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: