Hi, Robert: Robert Osfield writes:
> Hi Alberto, > > I'm not the original author of the bit of code that has been modified > so can't instantly know the intended effect of the original code or > the modification, I therefore need more to go on when reviewing > changes. Without context of what specific bug this change address and > ideally a means of recreating the bug so I can see first hand the > problem I can't safely review the change. Right now it's just a random > fix submitted by a third person, with the original "fix" by an unknown > person with an unknown usage case that produced a possible but > unspecified bug. > > I'm not inclined to merge random stuff for random reasons. Do you know > any background to it? Yes, I do. The original code intends to remove elements with the value "triToAddIdx" by means of using std::remove. This is a common pitfall, since std::remove does not delete those elements by itself, but places them instead at the beginning of the sequence in order to be collected later by a container-specific algorithm, as std::vector::erase. This is a common idiom called "erase-remove" (https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom) Sorry if it was not apparent from the beginning. Regards, -- Alberto _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
