Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 595 Bytes

File metadata and controls

32 lines (25 loc) · 595 Bytes

AC0007 Operator method doesn't have [MethodImpl(MethodImplOptions.AggressiveInlining)] attribute

Examples of patterns that are flagged by this analyzer

struct OpSeg : ISegtreeOperator<int>
{
    public int Identity => default;

    public int Operate(int x, int y)
    {
        return default;
    }
}

Solution

MethodImpl 属性を付与します。

struct OpSeg : ISegtreeOperator<int>
{
    public int Identity => default;

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int Operate(int x, int y)
    {
        return default;
    }
}