Skip to content

Commit

Permalink
Automatic Whitespace fixup made by Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikhr committed May 19, 2024
1 parent 6703d6a commit c246b41
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,18 +1454,18 @@ static void GenerateTransparentStructs(PInvokeGenerator generator, Stream? strea
return type.Contains('*', StringComparison.Ordinal)
? (8, 4, +1)
: type switch {
"sbyte" => (1, 1, -1),
"byte" => (1, 1, +1),
"short" => (2, 2, -1),
"ushort" => (2, 2, +1),
"int" => (4, 4, -1),
"uint" => (4, 4, +1),
"nint" => (8, 4, -1),
"nuint" => (8, 4, +1),
"long" => (8, 8, -1),
"ulong" => (8, 8, +1),
_ => (0, 0, 0),
};
"sbyte" => (1, 1, -1),
"byte" => (1, 1, +1),
"short" => (2, 2, -1),
"ushort" => (2, 2, +1),
"int" => (4, 4, -1),
"uint" => (4, 4, +1),
"nint" => (8, 4, -1),
"nuint" => (8, 4, +1),
"long" => (8, 8, -1),
"ulong" => (8, 8, +1),
_ => (0, 0, 0),
};
}

static void OutputConversions(StreamWriter sw, string indentString, string name, string type, PInvokeGeneratorTransparentStructKind kind, string target)
Expand Down Expand Up @@ -5403,7 +5403,7 @@ private static bool IsTransparentStructBoolean(PInvokeGeneratorTransparentStruct
=> kind is PInvokeGeneratorTransparentStructKind.Boolean;

private static bool IsTransparentStructHandle(PInvokeGeneratorTransparentStructKind kind)
=> kind is PInvokeGeneratorTransparentStructKind.Handle
=> kind is PInvokeGeneratorTransparentStructKind.Handle
or PInvokeGeneratorTransparentStructKind.HandleWin32;

private static bool IsTransparentStructHexBased(PInvokeGeneratorTransparentStructKind kind)
Expand Down Expand Up @@ -6149,7 +6149,7 @@ private bool NeedsReturnFixup(CXXMethodDecl cxxMethodDecl)

private static bool NeedsNewKeyword(string name)
{
return name.Equals("Equals",StringComparison.Ordinal)
return name.Equals("Equals", StringComparison.Ordinal)
|| name.Equals("GetHashCode", StringComparison.Ordinal)
|| name.Equals("GetType", StringComparison.Ordinal)
|| name.Equals("MemberwiseClone", StringComparison.Ordinal)
Expand Down Expand Up @@ -6215,7 +6215,7 @@ private static string PrefixAndStrip(string name, string prefix, char trimChar =
return nameSpan.ToString();
}
return name;
}
}

private string PrefixAndStripMethodName(string name, uint overloadIndex)
{
Expand Down

0 comments on commit c246b41

Please sign in to comment.