Skip to content

Commit

Permalink
Fixed compile errors (again).
Browse files Browse the repository at this point in the history
Signed-off-by: AraHaan <[email protected]>
  • Loading branch information
AraHaan committed Aug 25, 2024
1 parent 42fd16a commit 5cce968
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 8 deletions.
3 changes: 3 additions & 0 deletions ref/BlowFish/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ dotnet_diagnostic.S3903.severity = none

# S1133: Deprecated code should be removed
dotnet_diagnostic.S1133.severity = suggestion

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions ref/Common/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ dotnet_diagnostic.CA1307.severity = warning

# S3903: Move '%s' into a named namespace.
dotnet_diagnostic.S3903.severity = none

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions ref/GitInformation/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,6 @@ dotnet_diagnostic.S3903.severity = none

# S1133: Do not forget to remove this deprecated code someday.
dotnet_diagnostic.S1133.severity = none

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions ref/MiniDump/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,6 @@ dotnet_diagnostic.CA1303.severity = warning

# S3903: Move '%s' into a named namespace.
dotnet_diagnostic.S3903.severity = none

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions ref/PluginFramework/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ dotnet_diagnostic.S101.severity = none

# S3903: Move '%s' into a named namespace.
dotnet_diagnostic.S3903.severity = none

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions ref/PluginUpdateCheck/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ dotnet_diagnostic.S3903.severity = none

# IDE0251: Make member 'readonly'
dotnet_diagnostic.IDE0251.severity = silent

# S2325: Methods and properties that don't access instance data should be static
dotnet_diagnostic.S2325.severity = none
3 changes: 3 additions & 0 deletions src/UnluacNET/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,6 @@ dotnet_diagnostic.IDE0072.severity = suggestion

#Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = suggestion

# S1244: Floating point numbers should not be tested for equality
dotnet_diagnostic.S1244.severity = none
4 changes: 2 additions & 2 deletions src/UnluacNET/Decompile/Decompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1352,9 +1352,9 @@ private Assignment ProcessOperation(Operation operation, int line, int nextLine,
// TODO: Optimize code
if (stmt != null)
{
if (stmt is Assignment)
if (stmt is Assignment _assign)
{
assign = stmt as Assignment;
assign = _assign;
if (!assign.GetFirstValue().IsMultiple)
{
block.AddStatement(stmt);
Expand Down
1 change: 1 addition & 0 deletions src/UnluacNET/LuaDecompileStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public LuaDecompileStream(Stream input)
/// <param name="keepOpen">
/// Controls if the stream keeps the input stream open when the stream is disposed.
/// </param>
[SuppressMessage("Style", "IDE0290:Use primary constructor", Justification = "Cannot be used for this class. This is a Roslyn Bug LOL.")]
public LuaDecompileStream(Stream input, bool keepOpen)
{
this.BaseStream = input;
Expand Down
8 changes: 4 additions & 4 deletions src/UnluacNET/Parse/LFunctionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override LFunction Parse(Stream stream, BHeader header)
s.VarArg);
}

protected void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
protected static void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
{
if (header.Debug)
{
Expand All @@ -54,7 +54,7 @@ protected void ParseCode(Stream stream, BHeader header, LFunctionParseState s)
}
}

protected void ParseConstants(Stream stream, BHeader header, LFunctionParseState s)
protected static void ParseConstants(Stream stream, BHeader header, LFunctionParseState s)
{
if (header.Debug)
{
Expand Down Expand Up @@ -106,8 +106,8 @@ protected virtual void ParseMain(Stream stream, BHeader header, LFunctionParseSt
s.LenParameter = stream.ReadByte();
s.VarArg = stream.ReadByte();
s.MaximumStackSize = stream.ReadByte();
this.ParseCode(stream, header, s);
this.ParseConstants(stream, header, s);
ParseCode(stream, header, s);
ParseConstants(stream, header, s);
this.ParseUpvalues(stream, header, s);
this.ParseDebug(stream, header, s);
}
Expand Down
4 changes: 2 additions & 2 deletions src/UnluacNET/Parse/LFunctionType52.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ protected override void ParseMain(Stream stream, BHeader header, LFunctionParseS
s.LenParameter = stream.ReadByte();
s.VarArg = stream.ReadByte();
s.MaximumStackSize = stream.ReadByte();
this.ParseCode(stream, header, s);
this.ParseConstants(stream, header, s);
ParseCode(stream, header, s);
ParseConstants(stream, header, s);
this.ParseUpvalues(stream, header, s);
this.ParseDebug(stream, header, s);
}
Expand Down

0 comments on commit 5cce968

Please sign in to comment.