Skip to content

Commit b381fa8

Browse files
authored
Fixed compile errors (again). (#310)
Signed-off-by: AraHaan <seandhunt_7@yahoo.com>
1 parent 42fd16a commit b381fa8

File tree

11 files changed

+30
-8
lines changed

11 files changed

+30
-8
lines changed

ref/BlowFish/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ dotnet_diagnostic.S3903.severity = none
149149

150150
# S1133: Deprecated code should be removed
151151
dotnet_diagnostic.S1133.severity = suggestion
152+
153+
# S2325: Methods and properties that don't access instance data should be static
154+
dotnet_diagnostic.S2325.severity = none

ref/Common/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ dotnet_diagnostic.CA1307.severity = warning
149149

150150
# S3903: Move '%s' into a named namespace.
151151
dotnet_diagnostic.S3903.severity = none
152+
153+
# S2325: Methods and properties that don't access instance data should be static
154+
dotnet_diagnostic.S2325.severity = none

ref/GitInformation/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,6 @@ dotnet_diagnostic.S3903.severity = none
152152

153153
# S1133: Do not forget to remove this deprecated code someday.
154154
dotnet_diagnostic.S1133.severity = none
155+
156+
# S2325: Methods and properties that don't access instance data should be static
157+
dotnet_diagnostic.S2325.severity = none

ref/MiniDump/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,6 @@ dotnet_diagnostic.CA1303.severity = warning
152152

153153
# S3903: Move '%s' into a named namespace.
154154
dotnet_diagnostic.S3903.severity = none
155+
156+
# S2325: Methods and properties that don't access instance data should be static
157+
dotnet_diagnostic.S2325.severity = none

ref/PluginFramework/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ dotnet_diagnostic.S101.severity = none
149149

150150
# S3903: Move '%s' into a named namespace.
151151
dotnet_diagnostic.S3903.severity = none
152+
153+
# S2325: Methods and properties that don't access instance data should be static
154+
dotnet_diagnostic.S2325.severity = none

ref/PluginUpdateCheck/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,6 @@ dotnet_diagnostic.S3903.severity = none
161161

162162
# IDE0251: Make member 'readonly'
163163
dotnet_diagnostic.IDE0251.severity = silent
164+
165+
# S2325: Methods and properties that don't access instance data should be static
166+
dotnet_diagnostic.S2325.severity = none

src/UnluacNET/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,6 @@ dotnet_diagnostic.IDE0072.severity = suggestion
193193

194194
#Remove unnecessary usings/imports
195195
dotnet_diagnostic.IDE0005.severity = suggestion
196+
197+
# S1244: Floating point numbers should not be tested for equality
198+
dotnet_diagnostic.S1244.severity = none

src/UnluacNET/Decompile/Decompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,9 @@ private Assignment ProcessOperation(Operation operation, int line, int nextLine,
13521352
// TODO: Optimize code
13531353
if (stmt != null)
13541354
{
1355-
if (stmt is Assignment)
1355+
if (stmt is Assignment _assign)
13561356
{
1357-
assign = stmt as Assignment;
1357+
assign = _assign;
13581358
if (!assign.GetFirstValue().IsMultiple)
13591359
{
13601360
block.AddStatement(stmt);

src/UnluacNET/LuaDecompileStream.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public LuaDecompileStream(Stream input)
3333
/// <param name="keepOpen">
3434
/// Controls if the stream keeps the input stream open when the stream is disposed.
3535
/// </param>
36+
[SuppressMessage("Style", "IDE0290:Use primary constructor", Justification = "Cannot be used for this class. This is a Roslyn Bug LOL.")]
3637
public LuaDecompileStream(Stream input, bool keepOpen)
3738
{
3839
this.BaseStream = input;

src/UnluacNET/Parse/LFunctionType.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public override LFunction Parse(Stream stream, BHeader header)
3333
s.VarArg);
3434
}
3535

36-
protected void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
36+
protected static void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
3737
{
3838
if (header.Debug)
3939
{
@@ -54,7 +54,7 @@ protected void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
5454
}
5555
}
5656

57-
protected void ParseConstants(Stream stream, BHeader header, LFunctionParseState s)
57+
protected static void ParseConstants(Stream stream, BHeader header, LFunctionParseState s)
5858
{
5959
if (header.Debug)
6060
{
@@ -106,8 +106,8 @@ protected virtual void ParseMain(Stream stream, BHeader header, LFunctionParseSt
106106
s.LenParameter = stream.ReadByte();
107107
s.VarArg = stream.ReadByte();
108108
s.MaximumStackSize = stream.ReadByte();
109-
this.ParseCode(stream, header, s);
110-
this.ParseConstants(stream, header, s);
109+
ParseCode(stream, header, s);
110+
ParseConstants(stream, header, s);
111111
this.ParseUpvalues(stream, header, s);
112112
this.ParseDebug(stream, header, s);
113113
}

src/UnluacNET/Parse/LFunctionType52.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ protected override void ParseMain(Stream stream, BHeader header, LFunctionParseS
2020
s.LenParameter = stream.ReadByte();
2121
s.VarArg = stream.ReadByte();
2222
s.MaximumStackSize = stream.ReadByte();
23-
this.ParseCode(stream, header, s);
24-
this.ParseConstants(stream, header, s);
23+
ParseCode(stream, header, s);
24+
ParseConstants(stream, header, s);
2525
this.ParseUpvalues(stream, header, s);
2626
this.ParseDebug(stream, header, s);
2727
}

0 commit comments

Comments
 (0)