From 2ab83e1abbf5ee6d00e16056a9e9394114026f28 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 7 Jan 2017 18:25:37 -0300 Subject: Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector --- modules/jpg/image_loader_jpegd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/jpg') 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 data; + PoolVector data; data.resize(dst_bpl * image_height); - DVector::Write dw = data.write(); + PoolVector::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::Write(); + dw = PoolVector::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 src_image; + PoolVector 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::Write w = src_image.write(); + PoolVector::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::Write(); + w = PoolVector::Write(); return err; -- cgit v1.2.3