Skip to content

Commit

Permalink
fix warning SA1413
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Apr 3, 2024
1 parent efbfbc2 commit 153ff35
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override bool Equals(object? other)
=> other switch {
EOJ otherEOJ => Equals(otherEOJ),
null => false,
_ => false
_ => false,
};

public override int GetHashCode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Write(Utf8JsonWriter writer, TByte value, JsonSerializerOpt

Span<char> hex = stackalloc char[2] {
Hexadecimals.ToHexChar(by >> 4),
Hexadecimals.ToHexChar(by & 0xF)
Hexadecimals.ToHexChar(by & 0xF),
};

writer.WriteStringValue(hex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public override void Write(Utf8JsonWriter writer, ushort value, JsonSerializerOp
Hexadecimals.ToHexChar((value >> 4) & 0xF),
Hexadecimals.ToHexChar(value & 0xF),
Hexadecimals.ToHexChar(value >> 12),
Hexadecimals.ToHexChar((value >> 8) & 0xF)
Hexadecimals.ToHexChar((value >> 8) & 0xF),
}
: stackalloc char[4] {
Hexadecimals.ToHexChar(value >> 12),
Hexadecimals.ToHexChar((value >> 8) & 0xF),
Hexadecimals.ToHexChar((value >> 4) & 0xF),
Hexadecimals.ToHexChar(value & 0xF)
Hexadecimals.ToHexChar(value & 0xF),
};

writer.WriteStringValue(hex);
Expand Down
2 changes: 1 addition & 1 deletion src/Smdn.Net.EchonetLite/Smdn.Net.EchonetLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SPDX-License-Identifier: MIT

<!-- disables code style/code analysis warnings configured by Smdn.MSBuild.ProjectAssets.Library -->
<PropertyGroup>
<NoWarn>SA1402;SA1413;SA1414;$(NoWarn)</NoWarn>
<NoWarn>SA1402;SA1414;$(NoWarn)</NoWarn>
<NoWarn>SA1505;SA1507;SA1508;SA1513;SA1514;SA1614;SA1623;SA1629;SA1642;$(NoWarn)</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public UdpEchonetLiteHandler(ILogger<UdpEchonetLiteHandler> logger)

try {
receiveUdpClient = new UdpClient(DefaultUdpPort) {
EnableBroadcast = true
EnableBroadcast = true,
};
}
catch (Exception ex) {
Expand Down Expand Up @@ -91,7 +91,7 @@ public async ValueTask SendAsync(IPAddress? address, ReadOnlyMemory<byte> data,
#endif

var sendUdpClient = new UdpClient() {
EnableBroadcast = true
EnableBroadcast = true,
};

sendUdpClient.Connect(remote);
Expand Down

0 comments on commit 153ff35

Please sign in to comment.