Array util methods should support mozilla::Array

RESOLVED FIXED in mozilla28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jchen, Assigned: jchen)

Tracking

unspecified
mozilla28
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Created attachment 827508 [details] [diff] [review]
Make ArrayLength, ArrayEnd, and PodArrayZero accept mozilla::Array argument (v1)

This patch makes ArrayLength, ArrayEnd, and PodArrayZero accept mozilla::Array as arguments. A test had to be changed to avoid a name conflict.
Attachment #827508 - Flags: review?(jwalden+bmo)
Blocks: 932865

Comment 2

5 years ago
Comment on attachment 827508 [details] [diff] [review]
Make ArrayLength, ArrayEnd, and PodArrayZero accept mozilla::Array argument (v1)

Review of attachment 827508 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/tests/TestObserverArray.cpp
@@ +8,5 @@
>  #include "nsTObserverArray.h"
>  
>  using namespace mozilla;
>  
> +typedef nsTObserverArray<int> Array_t;

IntArray seems preferable to _t naming.  (I think type names ending with _t might even be reserved in C11 or C++11, can't remember for sure.)
Attachment #827508 - Flags: review?(jwalden+bmo) → review+
Created attachment 831103 [details] [diff] [review]
Make ArrayLength, ArrayEnd, and PodArrayZero accept mozilla::Array argument (v1.1)

(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #2)
> Comment on attachment 827508 [details] [diff] [review]
> Make ArrayLength, ArrayEnd, and PodArrayZero accept mozilla::Array argument
> (v1)
> 
> Review of attachment 827508 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: xpcom/tests/TestObserverArray.cpp
> @@ +8,5 @@
> >  #include "nsTObserverArray.h"
> >  
> >  using namespace mozilla;
> >  
> > +typedef nsTObserverArray<int> Array_t;
> 
> IntArray seems preferable to _t naming.  (I think type names ending with _t
> might even be reserved in C11 or C++11, can't remember for sure.)

Yeah I like IntArray.

Pushed to
https://hg.mozilla.org/integration/mozilla-inbound/rev/e70c1287741e
Attachment #827508 - Attachment is obsolete: true
Attachment #831103 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/e70c1287741e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.