Skip to content

Commit ea2ffbd

Browse files
authored
Avoid a byte[] in Guid construction in TypeConverter (#105208)
Also clean up a stale optimization in Guid's ctor
1 parent cc43559 commit ea2ffbd

File tree

2 files changed

+2
-2
lines changed
  • src/libraries

2 files changed

+2
-2
lines changed

src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/StandardCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ private static class ShellGuids
13461346
internal static readonly Guid guidDsdCmdId = new Guid("{1F0FD094-8e53-11d2-8f9c-0060089fc486}");
13471347
internal static readonly Guid SID_SOleComponentUIManager = new Guid("{5efc7974-14bc-11cf-9b2b-00aa00573819}");
13481348
internal static readonly Guid GUID_VSTASKCATEGORY_DATADESIGNER = new Guid("{6B32EAED-13BB-11d3-A64F-00C04F683820}");
1349-
internal static readonly Guid GUID_PropertyBrowserToolWindow = new Guid(unchecked((int)0xeefa5220), unchecked((short)0xe298), unchecked((short)0x11d0), new byte[] { 0x8f, 0x78, 0x0, 0xa0, 0xc9, 0x11, 0x0, 0x57 });
1349+
internal static readonly Guid GUID_PropertyBrowserToolWindow = new Guid(0xeefa5220, 0xe298, 0x11d0, 0x8f, 0x78, 0x0, 0xa0, 0xc9, 0x11, 0x0, 0x57);
13501350
}
13511351
}
13521352
}

src/libraries/System.Private.CoreLib/src/System/Guid.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ public Guid(int a, short b, short c, byte[] d)
130130
_a = a;
131131
_b = b;
132132
_c = c;
133-
_k = d[7]; // hoist bounds checks
134133
_d = d[0];
135134
_e = d[1];
136135
_f = d[2];
137136
_g = d[3];
138137
_h = d[4];
139138
_i = d[5];
140139
_j = d[6];
140+
_k = d[7];
141141
}
142142

143143
// Creates a new GUID initialized to the value represented by the

0 commit comments

Comments
 (0)