You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
SynthBenchmark: Fixed conversion warnings. Enabled UnsafeTypeCast warnings as errors.
#rb Catalin.Dragoiu [CL 28340939 by ionut matasaru in ue5-main branch]
This commit is contained in:
@@ -46,7 +46,7 @@ float FractalBenchmark()
|
||||
{
|
||||
for(int x = 0; x < Extent; ++x)
|
||||
{
|
||||
Sum += EvaluateJuliaFractalAt(x / (float)Extent * 2 - 1, y / (float)Extent * 2 - 1);
|
||||
Sum += (float)EvaluateJuliaFractalAt((float)x / (float)Extent * 2.0f - 1.0f, (float)y / (float)Extent * 2.0f - 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,5 +72,5 @@ float RayIntersectBenchmark()
|
||||
}
|
||||
|
||||
// to avoid getting optimized out
|
||||
return HitCount / (float)StepCount;
|
||||
return (float)HitCount / (float)StepCount;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ static FTimeSample RunBenchmark(float WorkScale, float (*Function)())
|
||||
FPlatformMisc::MemoryBarrier();
|
||||
}
|
||||
|
||||
return FTimeSample(Sum, Sum / RunCount);
|
||||
return FTimeSample(Sum, Sum / (float)RunCount);
|
||||
}
|
||||
|
||||
template<int NumMethods>
|
||||
|
||||
@@ -6,15 +6,17 @@ namespace UnrealBuildTool.Rules
|
||||
{
|
||||
public SynthBenchmark(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
UnsafeTypeCastWarningLevel = WarningLevel.Error;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"RenderCore",
|
||||
"RHI",
|
||||
"RenderCore",
|
||||
"RHI",
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
@@ -22,14 +24,14 @@ namespace UnrealBuildTool.Rules
|
||||
"ApplicationCore"
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user