Skip to content

Commit

Permalink
fix warning IDE0055: Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Dec 18, 2023
1 parent cf85e55 commit dc3b434
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ namespace Smdn.Collections;
*/
[System.Runtime.CompilerServices.TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
#pragma warning disable CA1711
public static class ReadOnlyDictionary<TKey, TValue>
where TKey : notnull
{
public static class ReadOnlyDictionary<TKey, TValue> where TKey : notnull {
#pragma warning restore CA1711
public static readonly IReadOnlyDictionary<TKey, TValue> Empty = new System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue>(new Dictionary<TKey, TValue>(0));
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public OctetEncoding(int bits)
{
}

/*public*/ private OctetEncoding(int bits, byte? encoderReplacement)
// public
private OctetEncoding(int bits, byte? encoderReplacement)
{
maxValue = ValidateMaxValue(bits, nameof(bits));
this.encoderReplacement = encoderReplacement;
Expand Down
3 changes: 1 addition & 2 deletions src/Smdn.Fundamental.MimeType/Smdn/MimeType.IEquatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ namespace Smdn;
partial class MimeType :
#pragma warning restore IDE0040
IEquatable<MimeType>,
IEquatable<string>
{
IEquatable<string> {
/*
* [RFC6838] Media Type Specifications and Registration Procedures 4.2. Naming Requirements
* 'Both top-level type and subtype names are case-insensitive.'
Expand Down
3 changes: 1 addition & 2 deletions src/Smdn.Fundamental.MimeType/Smdn/MimeType.IFormattable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ namespace Smdn;
#pragma warning disable IDE0040
partial class MimeType :
#pragma warning restore IDE0040
IFormattable
{
IFormattable {
public string ToString(string? format, IFormatProvider? formatProvider)
{
char[]? destination = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset, int inp
var ret = 0;
var paddedBlockDecoded = false;

for (; ;) {
for (; ; ) {
for (; bufferOffset < 4;) {
if (inputCount <= 0)
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset,
outputBuffer[outputOffset++] = toBase64Table[b];
ret++;

b = (inputBuffer[inputOffset++] & 0x03 ) << 4;
b = (inputBuffer[inputOffset++] & 0x03) << 4;
inputCount--;

if (0 < inputCount) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;

using Smdn.Reflection.Attributes;

namespace Smdn.Reflection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Diagnostics.CodeAnalysis;
#endif
using System.Reflection;

using Smdn.Reflection.Attributes;

namespace Smdn.Reflection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;

using Smdn.Reflection.Attributes;

namespace Smdn.Reflection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Smdn.IO.Streams.LineOriented;
[System.Runtime.CompilerServices.TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public partial class LineOrientedStream : Stream {
protected const int DefaultBufferSize = 1024;
/*private*/ protected const int MinimumBufferSize = 1;
/*private*/ protected const bool DefaultLeaveStreamOpen = false;
protected const int MinimumBufferSize = 1; // TODO: make private
protected const bool DefaultLeaveStreamOpen = false; // TODO: make private

public override bool CanSeek => !IsClosed && stream.CanSeek;
public override bool CanRead => !IsClosed && stream.CanRead;
Expand Down

0 comments on commit dc3b434

Please sign in to comment.