Skip to content

Commit

Permalink
Be more bitwise
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed Sep 1, 2022
1 parent 0518539 commit 65fd1ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OpenTelemetry/Metrics/MetricTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public static class MetricTypeExtensions
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsSum(this MetricType self)
{
return (self & METRIC_TYPE_MASK) == METRIC_TYPE_MONOTONIC_SUM || (self & METRIC_TYPE_MASK) == METRIC_TYPE_NON_MONOTONIC_SUM;
var type = self & METRIC_TYPE_MASK;
return type == METRIC_TYPE_MONOTONIC_SUM || type == METRIC_TYPE_NON_MONOTONIC_SUM;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down

0 comments on commit 65fd1ee

Please sign in to comment.