TIndirectArray's placement new syntax deprecated, which can cause new/free or malloc/delete mismatches.

Also see UE-64535.

#rb martin.ridgers
#fyi luke.thatcher

[CL 4623722 by Steve Robb in Dev-Core branch]
This commit is contained in:
Steve Robb
2018-12-03 10:52:48 -05:00
parent ab656b444e
commit 3ecfe5151c
65 changed files with 224 additions and 132 deletions

View File

@@ -1261,7 +1261,8 @@ static void GenerateAngularFilteredMip(FImage* DestMip, FImage& SrcMip, float Co
for (int32 Face = 0; Face < 6; ++Face)
{
auto* AsyncTask = new(AsyncTasks) FAsyncGenerateMipsPerFaceTask(Face, DestMip, MipExtent, ConeAngle, TexelAreaArray.GetData(), &SrcMip);
auto* AsyncTask = new FAsyncGenerateMipsPerFaceTask(Face, DestMip, MipExtent, ConeAngle, TexelAreaArray.GetData(), &SrcMip);
AsyncTasks.Add(AsyncTask);
AsyncTask->StartBackgroundTask();
}
@@ -1785,12 +1786,13 @@ static bool CompressMipChain(
FCompressedImage2D& DestMip = *new(OutMips) FCompressedImage2D;
if (bAllowParallelBuild && FMath::Min(SrcMip.SizeX, SrcMip.SizeY) >= MinAsyncCompressionSize)
{
FAsyncCompressionTask* AsyncTask = new(AsyncCompressionTasks) FAsyncCompressionTask(
FAsyncCompressionTask* AsyncTask = new FAsyncCompressionTask(
TextureFormat,
&SrcMip,
Settings,
bImageHasAlphaChannel
);
AsyncCompressionTasks.Add(AsyncTask);
#if WITH_EDITOR
AsyncTask->StartBackgroundTask(GLargeThreadPool);
#else