Merge pull request #616 from diamante0018/develop
[RawFile]: Remove copy & pasted code
This commit is contained in:
commit
2bc9564738
@ -25,7 +25,7 @@ namespace Assets
|
||||
// Only save the compressed buffer if we gained space
|
||||
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());
|
||||
asset->compressedLen = static_cast<int>(compressedData.size());
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ namespace Components
|
||||
void ZoneBuilder::Zone::addBranding()
|
||||
{
|
||||
constexpr auto* data = "Built using the IW4x Zone:B:uilder Version 4";
|
||||
auto dataLen = std::strlen(data) + 1;
|
||||
auto dataLen = std::strlen(data); // + 1 is added by the save code
|
||||
|
||||
this->branding = { this->zoneName.data(), 0, static_cast<int>(dataLen), data };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user