Skip to content

Commit c632b57

Browse files
committed
Fix IDE0038 violations.
1 parent 55b7921 commit c632b57

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ dotnet_diagnostic.IDE0032.severity = suggestion
6363
# Simplify default expression
6464
dotnet_diagnostic.IDE0034.severity = suggestion
6565
# Use pattern matching to avoid is check followed by a cast (without variable)
66-
dotnet_diagnostic.IDE0038.severity = warning
66+
dotnet_diagnostic.IDE0038.severity = warning # Note that this doesn't work with `dotnet build` but does work inside Visual Studio.
6767
# Use is null check
6868
dotnet_diagnostic.IDE0041.severity = warning
6969
# Deconstruct variable declaration

src/BizHawk.Client.Common/savestates/SavestateFile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ public void Create(string filename, SaveStateConfig config)
108108
});
109109
}
110110

111-
if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie)
111+
if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie tasMovie)
112112
{
113-
bs.PutLump(BinaryStateLump.LagLog, tw => ((ITasMovie) _movieSession.Movie).LagLog.Save(tw));
113+
bs.PutLump(BinaryStateLump.LagLog, tasMovie.LagLog.Save);
114114
}
115115
}
116116

@@ -193,9 +193,9 @@ public bool Load(string path, IDialogParent dialogParent)
193193
foreach (var (k, v) in bag) _userBag.Add(k, v);
194194
}
195195

196-
if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie)
196+
if (_movieSession.Movie.IsActive() && _movieSession.Movie is ITasMovie tasMovie)
197197
{
198-
bl.GetLump(BinaryStateLump.LagLog, abort: false, tr => ((ITasMovie) _movieSession.Movie).LagLog.Load(tr));
198+
bl.GetLump(BinaryStateLump.LagLog, abort: false, tasMovie.LagLog.Load);
199199
}
200200

201201
return true;

0 commit comments

Comments
 (0)