Add parentheses for clarity where needed (IDE0048)
このコミットが含まれているのは:
1 親
553c7a4014
コミット
ce1097e7d9
47ファイル変更
+222
-198
検索条件に一致するファイルはありません
+1
-1
@@ -132,7 +132,7 @@ partial class ID2D1ShaderGenerator
|
||||
|
||||
builder.Add(startingRawDataOffset);
|
||||
|
||||
rawDataOffset = startingRawDataOffset + fieldPack * columns;
|
||||
rawDataOffset = startingRawDataOffset + (fieldPack * columns);
|
||||
}
|
||||
|
||||
return new FieldInfo.NonLinearMatrix(
|
||||
|
||||
+3
-3
@@ -485,7 +485,7 @@ unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
(dimensions > 2 ? z * strides[1] : 0);
|
||||
byte* destinationDataPlane =
|
||||
@this->data +
|
||||
(dimensions > 2 ? minimumExtents[2] * @this->strides[1] + z * @this->strides[1] : 0) +
|
||||
(dimensions > 2 ? (minimumExtents[2] * @this->strides[1]) + (z * @this->strides[1]) : 0) +
|
||||
(dimensions > 1 ? minimumExtents[1] * @this->strides[0] : 0);
|
||||
|
||||
for (int y = 0; y < updateExtents[1]; y++)
|
||||
@@ -582,7 +582,7 @@ unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
|
||||
try
|
||||
{
|
||||
extent01SizeInBytes = checked((extents[1] - 1) * strides[0] + extent0SizeInBytes);
|
||||
extent01SizeInBytes = checked(((extents[1] - 1) * strides[0]) + extent0SizeInBytes);
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
@@ -609,7 +609,7 @@ unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
|
||||
try
|
||||
{
|
||||
extent012SizeInBytes = (extents[2] - 1) * strides[1] + extent01SizeInBytes;
|
||||
extent012SizeInBytes = ((extents[2] - 1) * strides[1]) + extent01SizeInBytes;
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ internal struct Point64
|
||||
// [ M21, M22 ]
|
||||
// [ x, y] [ M31, M32 ] = [ x * M11 + y * M21 + M31, x * M12 + y * M22 + m32]
|
||||
return (
|
||||
Math.Round((double)this.x * matrix.M11 + (double)this.y * matrix.M21 + matrix.M31),
|
||||
Math.Round((double)this.x * matrix.M12 + (double)this.y * matrix.M22 + matrix.M32));
|
||||
Math.Round(((double)this.x * matrix.M11) + ((double)this.y * matrix.M21) + matrix.M31),
|
||||
Math.Round(((double)this.x * matrix.M12) + ((double)this.y * matrix.M22) + matrix.M32));
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ internal static class SyntaxTokenHelper
|
||||
// An extra newline and indentation has to be added to the raw text when there is no trailing newline, as not doing
|
||||
// so would otherwise case the terminating """ token to fall on the same line, which is invalid syntax. This is only
|
||||
// needed to make the code valid, as the actual literal context of the string is not affected and remains the same.
|
||||
string indentation = new(' ', 4 * indentationLevel + 4 + 4);
|
||||
string indentation = new(' ', (4 * indentationLevel) + 4 + 4);
|
||||
|
||||
return Token(
|
||||
TriviaList(),
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
#pragma warning disable CS0809, IDE0009, IDE1006
|
||||
#pragma warning disable CS0809, IDE0009, IDE1006, IDE0048
|
||||
|
||||
namespace System;
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ partial class IShaderGenerator
|
||||
|
||||
builder.Add(startingRawDataOffset);
|
||||
|
||||
rawDataOffset = startingRawDataOffset + fieldPack * columns;
|
||||
rawDataOffset = startingRawDataOffset + (fieldPack * columns);
|
||||
}
|
||||
|
||||
return new FieldInfo.NonLinearMatrix(
|
||||
|
||||
@@ -31,8 +31,8 @@ internal static class MemoryHelper
|
||||
where T : unmanaged
|
||||
{
|
||||
// Offset adjustment
|
||||
source = (byte*)source + sourceElementOffset * sourceElementPitchInBytes;
|
||||
destination = (byte*)destination + destinationElementOffset * destinationElementPitchInBytes;
|
||||
source = (byte*)source + (sourceElementOffset * sourceElementPitchInBytes);
|
||||
destination = (byte*)destination + (destinationElementOffset * destinationElementPitchInBytes);
|
||||
|
||||
if (sourceElementPitchInBytes == (uint)sizeof(T))
|
||||
{
|
||||
@@ -54,7 +54,7 @@ internal static class MemoryHelper
|
||||
uint destinationElementPitchInBytes,
|
||||
uint count)
|
||||
{
|
||||
void* sourceEnd = (byte*)source + count * sizeof(T);
|
||||
void* sourceEnd = (byte*)source + (count * sizeof(T));
|
||||
|
||||
while (source < sourceEnd)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ internal static class MemoryHelper
|
||||
uint sourceElementPitchInBytes,
|
||||
uint count)
|
||||
{
|
||||
void* sourceEnd = (byte*)source + count * sourceElementPitchInBytes;
|
||||
void* sourceEnd = (byte*)source + (count * sourceElementPitchInBytes);
|
||||
|
||||
while (source < sourceEnd)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ internal static class MemoryHelper
|
||||
uint destinationElementPitchInBytes,
|
||||
uint count)
|
||||
{
|
||||
void* sourceEnd = (byte*)source + count * sourceElementPitchInBytes;
|
||||
void* sourceEnd = (byte*)source + (count * sourceElementPitchInBytes);
|
||||
|
||||
while (source < sourceEnd)
|
||||
{
|
||||
@@ -140,8 +140,8 @@ internal static class MemoryHelper
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
Buffer.MemoryCopy(
|
||||
(byte*)source + (uint)i * widthInBytes,
|
||||
(byte*)destination + (uint)i * pitchInBytes,
|
||||
(byte*)source + ((uint)i * widthInBytes),
|
||||
(byte*)destination + ((uint)i * pitchInBytes),
|
||||
ulong.MaxValue,
|
||||
widthInBytes);
|
||||
}
|
||||
@@ -173,8 +173,8 @@ internal static class MemoryHelper
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
Buffer.MemoryCopy(
|
||||
(byte*)source + (uint)i * pitchInBytes,
|
||||
(byte*)destination + (uint)i * widthInBytes,
|
||||
(byte*)source + ((uint)i * pitchInBytes),
|
||||
(byte*)destination + ((uint)i * widthInBytes),
|
||||
ulong.MaxValue,
|
||||
widthInBytes);
|
||||
}
|
||||
@@ -215,8 +215,8 @@ internal static class MemoryHelper
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
Buffer.MemoryCopy(
|
||||
(byte*)source + sourceZOffset + (uint)i * widthInBytes,
|
||||
(byte*)destination + destinationZOffset + (uint)i * pitchInBytes,
|
||||
(byte*)source + sourceZOffset + ((uint)i * widthInBytes),
|
||||
(byte*)destination + destinationZOffset + ((uint)i * pitchInBytes),
|
||||
ulong.MaxValue,
|
||||
widthInBytes);
|
||||
}
|
||||
@@ -258,8 +258,8 @@ internal static class MemoryHelper
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
Buffer.MemoryCopy(
|
||||
(byte*)source + sourceZOffset + (uint)i * pitchInBytes,
|
||||
(byte*)destination + destinationZOffset + (uint)i * widthInBytes,
|
||||
(byte*)source + sourceZOffset + ((uint)i * pitchInBytes),
|
||||
(byte*)destination + destinationZOffset + ((uint)i * widthInBytes),
|
||||
ulong.MaxValue,
|
||||
widthInBytes);
|
||||
}
|
||||
|
||||
@@ -60,20 +60,20 @@ public readonly struct Luid : IEquatable<Luid>
|
||||
/// <inheritdoc/>
|
||||
public override string ToString()
|
||||
{
|
||||
return (((long)this.highPart) << 32 | this.lowPart).ToString();
|
||||
return ((((long)this.highPart) << 32) | this.lowPart).ToString();
|
||||
}
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
/// <inheritdoc/>
|
||||
public string ToString(string? format, IFormatProvider? formatProvider)
|
||||
{
|
||||
return (((long)this.highPart) << 32 | this.lowPart).ToString(format, formatProvider);
|
||||
return ((((long)this.highPart) << 32) | this.lowPart).ToString(format, formatProvider);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
|
||||
{
|
||||
return (((long)this.highPart) << 32 | this.lowPart).TryFormat(destination, out charsWritten, format, provider);
|
||||
return ((((long)this.highPart) << 32) | this.lowPart).TryFormat(destination, out charsWritten, format, provider);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする