|
|
Warp wrote:
> std::vector<hgeSprite> tile;
>
> tile.reserve(8*8);
> for(...)
> for(...)
> tile.push_back(hgeSprite(...));
Not that I'd recommend micro-optimization over readability, but isn't this
going to be more inefficient than the other way? Doesn't this allocate a
sprite on the stack, pass it to tile.push_back(), which then has to copy it
to dynamically allocated memory anyway?
--
Darren New, San Diego CA, USA (PST)
The NFL should go international. I'd pay to
see the Detroit Lions vs the Roman Catholics.
Post a reply to this message
|
|