use std::vector as return value for the FileReader's buffer readers.
This commit is contained in:
parent
12c7413149
commit
21d6eb99eb
18 changed files with 66 additions and 63 deletions
|
|
@ -59,9 +59,9 @@ FImageSource *WebPImage_TryCreate(FileReader &file, int lumpnum)
|
|||
file.Seek(0, FileReader::SeekSet);
|
||||
auto bytes = file.Read();
|
||||
|
||||
if (WebPGetInfo(bytes.Data(), bytes.Size(), &width, &height))
|
||||
if (WebPGetInfo(bytes.data(), bytes.size(), &width, &height))
|
||||
{
|
||||
WebPData data{ bytes.Data(), bytes.Size() };
|
||||
WebPData data{ bytes.data(), bytes.size() };
|
||||
WebPData chunk_data;
|
||||
auto mux = WebPMuxCreate(&data, 0);
|
||||
if (mux)
|
||||
|
|
@ -137,7 +137,7 @@ int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion)
|
|||
config.output.u.RGBA.stride = bmp->GetPitch();
|
||||
config.output.is_external_memory = 1;
|
||||
|
||||
(void)WebPDecode(bytes.Data(), bytes.Size(), &config);
|
||||
(void)WebPDecode(bytes.data(), bytes.size(), &config);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue