Closed Bug 935089 Opened 11 years ago Closed 11 years ago

Array util methods should support mozilla::Array

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
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 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+
(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
Closed: 11 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.

Attachment

General

Created:
Updated:
Size: