Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,

leading to unnecesary copy on writes and reduced performance.
This commit is contained in:
Juan Linietsky 2017-11-25 00:07:54 -03:00
parent 7dfba3cda9
commit bc2e8d99e5
62 changed files with 148 additions and 147 deletions

View file

@ -499,7 +499,7 @@ struct _VariantCall {
PoolByteArray::Read r = ba->read();
CharString cs;
cs.resize(ba->size() + 1);
copymem(cs.ptr(), r.ptr(), ba->size());
copymem(cs.ptrw(), r.ptr(), ba->size());
cs[ba->size()] = 0;
s = cs.get_data();