Skip to content

Commit 21de86c

Browse files
committed
remove redundant sum variable
1 parent ab174fd commit 21de86c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ImageSharp/Processing/Processors/Transforms/TransformKernelMap.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Six Labors and contributors.
1+
// Copyright (c) Six Labors and contributors.
22
// Licensed under the Apache License, Version 2.0.
33

44
using System;
@@ -130,11 +130,9 @@ public void Convolve<TPixel>(
130130
[MethodImpl(InliningOptions.ShortMethod)]
131131
private void CalculateWeights(int min, int max, float point, ref float weightsRef)
132132
{
133-
float sum = 0;
134133
for (int x = 0, i = min; i <= max; i++, x++)
135134
{
136135
float weight = this.sampler.GetValue(i - point);
137-
sum += weight;
138136
Unsafe.Add(ref weightsRef, x) = weight;
139137
}
140138
}
@@ -158,4 +156,4 @@ public void Dispose()
158156
this.xBuffer?.Dispose();
159157
}
160158
}
161-
}
159+
}

0 commit comments

Comments
 (0)