mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-11-04 21:01:48 +00:00
"Fix" warnings
This commit is contained in:
@@ -310,7 +310,7 @@ class AssetCache
|
||||
Try!(compressedStream.TryRead(compressedData));
|
||||
|
||||
MemoryStream ms = new MemoryStream(asset.UncompressedByteCount);
|
||||
ms.Memory.GrowUnitialized(asset.UncompressedByteCount);
|
||||
ms.Memory.GrowUninitialized(asset.UncompressedByteCount);
|
||||
|
||||
LZ4.LZ4F_dctx* context;
|
||||
LZ4.LZ4F_CreateDecompressionContext(out context);
|
||||
|
||||
@@ -630,7 +630,7 @@ static class DdsImporter
|
||||
surfaces.Reserve(surfaceCount);
|
||||
|
||||
uint32 scanLineSize = 0;
|
||||
uint32 slicePitch = 0;
|
||||
//uint32 slicePitch = 0;
|
||||
uint64 numBytes = 0;
|
||||
uint32 blockSize = 0; // Block size in bytes.
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class MaterialVariable
|
||||
|
||||
Result<int, Int.ParseError> rowsResult = int.Parse(rowsString);
|
||||
|
||||
if (rowsResult case .Err(let error))
|
||||
if (rowsResult case .Err(var error))
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ class MaterialVariable
|
||||
|
||||
Result<int, Int.ParseError> columnsResult = int.Parse(columnsString);
|
||||
|
||||
if (columnsResult case .Err(let error))
|
||||
if (columnsResult case .Err(out error))
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
|
||||
@@ -226,7 +226,7 @@ extension ShaderCompiler
|
||||
|
||||
Try!(ShaderCodePreprocessor.ProcessFileContent(shaderCode, context.VsName, context.PsName, context.Variables, context.BufferNames, context.EngineBuffers));
|
||||
|
||||
using (let includer = PreprocessingIncluder(directory, context))
|
||||
using (var includer = PreprocessingIncluder(directory, context))
|
||||
{
|
||||
var result = D3DCompiler.D3DCompile(code.Ptr, (.)code.Length, fileName.FullIdentifier.ToScopeCStr!(), nativeMacros, &includer, entryPoint.ToScopeCStr!(),
|
||||
compileTarget.ToScopeCStr!(), DefaultCompileFlags /* Pass down compile flags? */, .None, &outShader._shaderBlob, &errorBlob);
|
||||
|
||||
@@ -205,14 +205,14 @@ class ShaderProcessor : IAssetProcessor
|
||||
|
||||
ProcessedShader.ConstantBufferEntry constantBufferEntry = .Default;
|
||||
|
||||
if (vsBufferResult case .Ok(let vsBuffer) && psBufferResult case .Ok(let psBuffer))
|
||||
if (vsBufferResult case .Ok(var vsBuffer) && psBufferResult case .Ok(let psBuffer))
|
||||
{
|
||||
// Choose larger buffer
|
||||
constantBufferEntry.ConstantBuffer = (vsBuffer.Size >= psBuffer.Size) ? vsBuffer : psBuffer;
|
||||
constantBufferEntry.VertexShaderBindPoint = (.)vsBuffer.BindPoint;
|
||||
constantBufferEntry.PixelShaderBindPoint = (.)psBuffer.BindPoint;
|
||||
}
|
||||
else if (vsBufferResult case .Ok(let vsBuffer))
|
||||
else if (vsBufferResult case .Ok(out vsBuffer))
|
||||
{
|
||||
constantBufferEntry.ConstantBuffer = vsBuffer;
|
||||
constantBufferEntry.VertexShaderBindPoint = (.)vsBuffer.BindPoint;
|
||||
|
||||
Reference in New Issue
Block a user