Skip to content

Commit

Permalink
Fix CA2265
Browse files Browse the repository at this point in the history
  • Loading branch information
RoosterDragon committed Nov 13, 2024
1 parent 0e4e41b commit 41b9dc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,9 @@ dotnet_diagnostic.CA2263.severity = none # TODO: Change to warning once mono is
# Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'.
dotnet_diagnostic.CA2264.severity = warning

# Do not compare 'Span<T>' to 'null' or 'default'.
dotnet_diagnostic.CA2265.severity = warning

### Roslynator.Analyzers
### https://josefpihrt.github.io/docs/roslynator/analyzers

Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/MiniYaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static List<MiniYamlNode> FromLines(IEnumerable<ReadOnlyMemory<char>> lines, str

// Note: We need to support empty comments here to ensure that empty comments
// (i.e. a lone # at the end of a line) can be correctly re-serialized
var commentString = comment == default ? null : comment.ToString();
var commentString = comment.IsEmpty ? null : comment.ToString();

keyString = keyString == null ? null : stringPool.GetOrAdd(keyString);
valueString = valueString == null ? null : stringPool.GetOrAdd(valueString);
Expand Down

0 comments on commit 41b9dc5

Please sign in to comment.