Skip to content

Commit

Permalink
Fix struct reordering (#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhevita authored Jul 10, 2024
1 parent 530743c commit b14d5de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 16 additions & 0 deletions ArchiSteamFarm.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,22 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WRAP_LINES/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CSharpFileLayoutPatterns/Pattern/@EntryValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&#xD;
&lt;Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"&gt;&#xD;
&lt;TypePattern DisplayName=&quot;Non-reorderable types&quot; Priority=&quot;99999999&quot;&gt;
&lt;TypePattern.Match&gt;
&lt;Or&gt;
&lt;And&gt;
&lt;Kind Is=&quot;Interface&quot; /&gt;
&lt;Or&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.InterfaceTypeAttribute&quot; /&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.ComImport&quot; /&gt;
&lt;/Or&gt;
&lt;/And&gt;
&lt;Kind Is=&quot;Struct&quot; /&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.StructLayoutAttribute&quot; /&gt;
&lt;HasAttribute Name=&quot;JetBrains.Annotations.NoReorderAttribute&quot; /&gt;
&lt;/Or&gt;
&lt;/TypePattern.Match&gt;
&lt;/TypePattern&gt;
&lt;TypePattern DisplayName="ArchiPattern" Priority="150"&gt;&#xD;
&lt;Entry DisplayName="Public (Events and Delegates)"&gt;&#xD;
&lt;Entry.Match&gt;&#xD;
Expand Down
2 changes: 0 additions & 2 deletions ArchiSteamFarm/Core/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ internal enum EStandardHandle {
[StructLayout(LayoutKind.Sequential)]
[SupportedOSPlatform("Windows")]
internal struct FlashWindowInfo {
#pragma warning disable Reordering // TODO: This silly pragma doesn't do anything, but it stops Rider from reordering, we may be able to get rid of it later
public uint StructSize;
public nint WindowHandle;
public EFlashFlags Flags;
public uint Count;
public uint TimeoutBetweenFlashes;
#pragma warning restore Reordering // TODO: This silly pragma doesn't do anything, but it stops Rider from reordering, we may be able to get rid of it later
}
}

0 comments on commit b14d5de

Please sign in to comment.