Skip to content

Commit 7b2aa63

Browse files
Remove unnecessary 'fixed' statement
1 parent 7b4d380 commit 7b2aa63

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/System.Drawing.Common/src/System/Drawing/Imaging/EncoderParameter.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,9 @@ public EncoderParameter(Encoder encoder, long[] value)
214214
_parameterValue = Marshal.AllocHGlobal(checked(_numberOfValues * sizeof(int)));
215215

216216
int* dest = (int*)_parameterValue;
217-
fixed (long* source = value)
217+
for (int i = 0; i < value.Length; i++)
218218
{
219-
for (int i = 0; i < value.Length; i++)
220-
{
221-
dest[i] = (int)source[i];
222-
}
219+
dest[i] = (int)value[i];
223220
}
224221

225222
GC.KeepAlive(this);

0 commit comments

Comments
 (0)