diff options
author | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2019-07-05 18:08:43 +0100 |
---|---|---|
committer | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2019-07-06 12:04:27 +0100 |
commit | 4e4697b1c481094949165fa9edbe6aeebcfcf3b4 (patch) | |
tree | a05fa9e7249febb9093885ddc21da1cd967be314 /modules/pvr/texture_loader_pvr.cpp | |
parent | 0b6b49a897b35bec53765e1288c32d57afa1a293 (diff) |
Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
Diffstat (limited to 'modules/pvr/texture_loader_pvr.cpp')
-rw-r--r-- | modules/pvr/texture_loader_pvr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 8f6ffcc83f..8b1f21d95d 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -153,7 +153,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, ERR_FAIL_V(RES()); } - w = PoolVector<uint8_t>::Write(); + w.release(); int tex_flags = Texture::FLAG_FILTER | Texture::FLAG_REPEAT; @@ -655,8 +655,8 @@ static void _pvrtc_decompress(Image *p_img) { decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr()); - w = PoolVector<uint8_t>::Write(); - r = PoolVector<uint8_t>::Read(); + w.release(); + r.release(); bool make_mipmaps = p_img->has_mipmaps(); p_img->create(p_img->get_width(), p_img->get_height(), false, Image::FORMAT_RGBA8, newdata); |