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

@ -125,7 +125,7 @@ Error DynamicFontAtSize::_load() {
_fontdata[font->font_path] = Vector<uint8_t>();
Vector<uint8_t> &fontdata = _fontdata[font->font_path];
fontdata.resize(len);
f->get_buffer(fontdata.ptr(), len);
f->get_buffer(fontdata.ptrw(), len);
font->set_font_ptr(fontdata.ptr(), len);
f->close();
}