[RawFile]: Remove copy & pasted code
This commit is contained in:
parent
d7afbd72e1
commit
ee2d12e404
@ -25,7 +25,7 @@ namespace Assets
|
|||||||
// Only save the compressed buffer if we gained space
|
// Only save the compressed buffer if we gained space
|
||||||
if (compressedData.size() < rawFile.getBuffer().size())
|
if (compressedData.size() < rawFile.getBuffer().size())
|
||||||
{
|
{
|
||||||
asset->buffer = builder->getAllocator()->duplicateString(compressedData);
|
asset->buffer = builder->getAllocator()->allocateArray<char>(compressedData.size());
|
||||||
std::memcpy(const_cast<char*>(asset->buffer), compressedData.data(), compressedData.size());
|
std::memcpy(const_cast<char*>(asset->buffer), compressedData.data(), compressedData.size());
|
||||||
asset->compressedLen = static_cast<int>(compressedData.size());
|
asset->compressedLen = static_cast<int>(compressedData.size());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user