summaryrefslogtreecommitdiff
path: root/modules/etc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-18 11:27:04 +0100
committerGitHub <noreply@github.com>2020-02-18 11:27:04 +0100
commitef5891091bceef2800b4fae4cd85af219e791467 (patch)
tree8d58cca8cae2c34d408450cfb5ceb198543147b7 /modules/etc
parentc7faf2e16b684f3dd0246dbdb662b1826dd24571 (diff)
parent3205a92ad872f918c8322cdcd1434c231a1fd251 (diff)
Merge pull request #36311 from reduz/poolvector-deprecation
Convert all references and instances of PoolVector to Vector
Diffstat (limited to 'modules/etc')
-rw-r--r--modules/etc/image_etc.cpp8
-rw-r--r--modules/etc/texture_loader_pkm.cpp7
2 files changed, 7 insertions, 8 deletions
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp
index 24ee8e458e..0dbd5ca905 100644
--- a/modules/etc/image_etc.cpp
+++ b/modules/etc/image_etc.cpp
@@ -143,16 +143,16 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
}
}
- PoolVector<uint8_t>::Read r = img->get_data().read();
- ERR_FAIL_COND(!r.ptr());
+ const uint8_t *r = img->get_data().ptr();
+ ERR_FAIL_COND(!r);
unsigned int target_size = Image::get_image_data_size(imgw, imgh, etc_format, p_img->has_mipmaps());
int mmc = 1 + (p_img->has_mipmaps() ? Image::get_image_required_mipmaps(imgw, imgh, etc_format) : 0);
- PoolVector<uint8_t> dst_data;
+ Vector<uint8_t> dst_data;
dst_data.resize(target_size);
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
// prepare parameters to be passed to etc2comp
int num_cpus = OS::get_singleton()->get_processor_count();
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index facdc2e473..e460c70cec 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -71,13 +71,12 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
h.origWidth = f->get_16();
h.origHeight = f->get_16();
- PoolVector<uint8_t> src_data;
+ Vector<uint8_t> src_data;
uint32_t size = h.texWidth * h.texHeight / 2;
src_data.resize(size);
- PoolVector<uint8_t>::Write wb = src_data.write();
- f->get_buffer(wb.ptr(), size);
- wb.release();
+ uint8_t *wb = src_data.ptrw();
+ f->get_buffer(wb, size);
int mipmaps = h.format;
int width = h.origWidth;