News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

bug in vector_tpl.h

Started by kniederk, November 22, 2010, 01:10:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kniederk

Hi,

I believe that the copy-constructor in tpl/vector_tpl.h in line 31 should read

count( copy_from.get_count() )

instead of

count( copy_from.get_size() )

otherwise there might be a lot of copying of empty data slots.

Klaus

prissi

That was a bad bug. Luckily this copy constructor was mostly called with completely filled vectors ...

Thanks!

kniederk

Of course, the right solution would be to port everything to the std:vector<..> templates to avoid this. ;)
Klaus