On Wed, Oct 8, 2008 at 10:45 AM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> Hi Mathias,
>
> Rather than have an #if #else #endif block with two implementations
> I'd rather stick with a single implementation.
>
> If memory templates are out of the question could we use an
> std::algorithm to copy the contents?  It's a very long while since
> I've done this but use of foreach and a back inserter would seem like
> the thing to try.   I'll dig open my STL book and have a look at this.

The line of code is simply...

std::copy(vertices.begin(), vertices.end(), std::back_inserter(face.vertices));

But... looking back over the code it's inserting the the new vector at
face.vertices.begin(), so perhaps it should be a front inserting, but
for std::vector<> this would be very expensive.  Will need to review
the wider code to see if the vector is empty and that back insertion
will be sufficient...

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to