Closed Bug 845527 Opened 7 years ago Closed 7 years ago

Replace nsMemoryReporterManager's nsCOMArray::Count() usages with Length()

Categories

(Toolkit :: about:memory, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We currently spam these build warnings:
{
xpcom/base/nsMemoryReporterManager.cpp: In member function ‘virtual nsresult {anonymous}::HashtableEnumerator::HasMoreElements(bool*)’:
xpcom/base/nsMemoryReporterManager.cpp:803:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

xpcom/base/nsMemoryReporterManager.cpp: In member function ‘virtual nsresult {anonymous}::HashtableEnumerator::GetNext(nsISupports**)’:
xpcom/base/nsMemoryReporterManager.cpp:809:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

for comparisons between an unsigned index and nsCOMArray::Count() in nsMemoryReporterManager.cpp.

I think we should just replace (all?) usages of Count() in that file with Length(). (which was recently added to nsCOMArray, for convenience)
Oh, looks like those are the only two usages of Count() in that file anyway. (For some reason I thought I saw others)

So, this is easy.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
(This patch also adds a newline between NS_IMETHODIMP and the function-signature, for consistency with the rest of the impls in this file & with prevailing mozilla style.)
Attachment #718660 - Flags: review?(justin.lebar+bug)
Attachment #718660 - Flags: review?(justin.lebar+bug) → review+
https://hg.mozilla.org/mozilla-central/rev/592eb93c5d73
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.