Fix CA1852
This commit is contained in:
committed by
Pavel Penev
parent
277699cbd5
commit
f4af5c1764
@@ -61,12 +61,12 @@ namespace OpenRA.Platforms.Default
|
||||
public void Dispose() { }
|
||||
}
|
||||
|
||||
class NullSoundSource : ISoundSource
|
||||
sealed class NullSoundSource : ISoundSource
|
||||
{
|
||||
public void Dispose() { }
|
||||
}
|
||||
|
||||
class NullSound : ISound
|
||||
sealed class NullSound : ISound
|
||||
{
|
||||
public float Volume { get; set; }
|
||||
public float SeekPosition => 0;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class TapHistory
|
||||
sealed class TapHistory
|
||||
{
|
||||
public (DateTime Time, int2 Location) FirstRelease, SecondRelease, ThirdRelease;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Platforms.Default
|
||||
return defaultDevices.Concat(physicalDevices).ToArray();
|
||||
}
|
||||
|
||||
class PoolSlot
|
||||
sealed class PoolSlot
|
||||
{
|
||||
public bool IsActive;
|
||||
public int FrameStarted;
|
||||
@@ -386,7 +386,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class OpenAlSoundSource : ISoundSource
|
||||
sealed class OpenAlSoundSource : ISoundSource
|
||||
{
|
||||
uint buffer;
|
||||
bool disposed;
|
||||
@@ -401,7 +401,7 @@ namespace OpenRA.Platforms.Default
|
||||
AL10.alBufferData(buffer, OpenAlSoundEngine.MakeALFormat(channels, sampleBits), data, byteCount, sampleRate);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
void Dispose(bool _)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
@@ -538,7 +538,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class OpenAlAsyncLoadSound : OpenAlSound
|
||||
sealed class OpenAlAsyncLoadSound : OpenAlSound
|
||||
{
|
||||
static readonly byte[] SilentData = new byte[2];
|
||||
readonly CancellationTokenSource cts = new();
|
||||
|
||||
@@ -16,7 +16,7 @@ using SDL2;
|
||||
|
||||
namespace OpenRA.Platforms.Default
|
||||
{
|
||||
class Sdl2Input
|
||||
sealed class Sdl2Input
|
||||
{
|
||||
MouseButton lastButtonBits = MouseButton.None;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ using System.Text;
|
||||
|
||||
namespace OpenRA.Platforms.Default
|
||||
{
|
||||
class Shader : ThreadAffine, IShader
|
||||
sealed class Shader : ThreadAffine, IShader
|
||||
{
|
||||
public const int VertexPosAttributeIndex = 0;
|
||||
public const int TexCoordAttributeIndex = 1;
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Platforms.Default
|
||||
readonly Queue<int> unbindTextures = new();
|
||||
readonly uint program;
|
||||
|
||||
protected static uint CompileShaderObject(int type, string name)
|
||||
static uint CompileShaderObject(int type, string name)
|
||||
{
|
||||
var ext = type == OpenGL.GL_VERTEX_SHADER ? "vert" : "frag";
|
||||
var filename = Path.Combine(Platform.EngineDir, "glsl", name + "." + ext);
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace OpenRA.Platforms.Default
|
||||
verticesPool.Push(vertices);
|
||||
}
|
||||
|
||||
class Message
|
||||
sealed class Message
|
||||
{
|
||||
public Message(ThreadedGraphicsContext device)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class ThreadedFrameBuffer : IFrameBuffer
|
||||
sealed class ThreadedFrameBuffer : IFrameBuffer
|
||||
{
|
||||
readonly ThreadedGraphicsContext device;
|
||||
readonly Func<ITexture> getTexture;
|
||||
@@ -500,7 +500,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class ThreadedVertexBuffer : IVertexBuffer<Vertex>
|
||||
sealed class ThreadedVertexBuffer : IVertexBuffer<Vertex>
|
||||
{
|
||||
readonly ThreadedGraphicsContext device;
|
||||
readonly Action bind;
|
||||
@@ -563,7 +563,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class ThreadedTexture : ITextureInternal
|
||||
sealed class ThreadedTexture : ITextureInternal
|
||||
{
|
||||
readonly ThreadedGraphicsContext device;
|
||||
readonly Func<object> getScaleFilter;
|
||||
@@ -658,7 +658,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
class ThreadedShader : IShader
|
||||
sealed class ThreadedShader : IShader
|
||||
{
|
||||
readonly ThreadedGraphicsContext device;
|
||||
readonly Action prepareRender;
|
||||
|
||||
Reference in New Issue
Block a user