diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-07 18:25:37 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-07 18:26:38 -0300 |
commit | 2ab83e1abbf5ee6d00e16056a9e9394114026f28 (patch) | |
tree | 7efbb375cc4d00d8e8589fcf1b6a1303bec5df2d /modules/jpg | |
parent | 2a38a5eaa844043b846e03d6655f84caf8a31e74 (diff) |
Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector
Diffstat (limited to 'modules/jpg')
-rw-r--r-- | modules/jpg/image_loader_jpegd.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp index 9709c0c706..1152d42e1b 100644 --- a/modules/jpg/image_loader_jpegd.cpp +++ b/modules/jpg/image_loader_jpegd.cpp @@ -56,11 +56,11 @@ Error jpeg_load_image_from_buffer(Image *p_image,const uint8_t* p_buffer, int p_ const int dst_bpl = image_width * comps; - DVector<uint8_t> data; + PoolVector<uint8_t> data; data.resize(dst_bpl * image_height); - DVector<uint8_t>::Write dw = data.write(); + PoolVector<uint8_t>::Write dw = data.write(); jpgd::uint8 *pImage_data = (jpgd::uint8*)dw.ptr(); @@ -88,7 +88,7 @@ Error jpeg_load_image_from_buffer(Image *p_image,const uint8_t* p_buffer, int p_ else fmt=Image::FORMAT_RGBA8; - dw = DVector<uint8_t>::Write(); + dw = PoolVector<uint8_t>::Write(); p_image->create(image_width,image_height,0,fmt,data); return OK; @@ -99,12 +99,12 @@ Error jpeg_load_image_from_buffer(Image *p_image,const uint8_t* p_buffer, int p_ Error ImageLoaderJPG::load_image(Image *p_image,FileAccess *f) { - DVector<uint8_t> src_image; + PoolVector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); src_image.resize(src_image_len); - DVector<uint8_t>::Write w = src_image.write(); + PoolVector<uint8_t>::Write w = src_image.write(); f->get_buffer(&w[0],src_image_len); @@ -113,7 +113,7 @@ Error ImageLoaderJPG::load_image(Image *p_image,FileAccess *f) { Error err = jpeg_load_image_from_buffer(p_image,w.ptr(),src_image_len); - w = DVector<uint8_t>::Write(); + w = PoolVector<uint8_t>::Write(); return err; |