On Mon, Jun 03, 2013 at 12:16:58PM -0400, Martin Owens wrote:
On Tue, 2013-06-04 at 02:02 +1000, Nathan Hurst wrote:
> for (int p = 0; p < 4; p++) {
> _vertices[i].rgba[p] = pixels[p];
> }
I'm surprised there's not a better way to do a list assignment, but I
guess C++ means it's not slow to loop and still recognizable to other
devs.
Well STL provides copy(...), but in my experience it's harder to use,
more error prone and harder to read. In practice the compiler turns
these loops into whatever is fastest (in this cases probably a 32 bit
load and store).
njh