Example #1
0
    public static TssSdtLong operator ++(TssSdtLong v)
    {
        TssSdtLong @long = new TssSdtLong();

        if (v == null)
        {
            @long.SetValue(1L);
            return(@long);
        }
        long num = v.GetValue() + 1L;

        @long.SetValue(num);
        return(@long);
    }
Example #2
0
    public static TssSdtLong operator --(TssSdtLong v)
    {
        TssSdtLong tssSdtLong = new TssSdtLong();

        if (v == null)
        {
            tssSdtLong.SetValue(-1L);
        }
        else
        {
            long num = v.GetValue();
            num -= 1L;
            tssSdtLong.SetValue(num);
        }
        return(tssSdtLong);
    }
Example #3
0
    public static TssSdtLong operator --(TssSdtLong v)
    {
        TssSdtLong tssSdtLong = new TssSdtLong();

        if (object.Equals(v, null))
        {
            long num = 0L;
            num -= 1L;
            tssSdtLong.SetValue(num);
        }
        else
        {
            long num2 = v.GetValue();
            num2 -= 1L;
            tssSdtLong.SetValue(num2);
        }
        return(tssSdtLong);
    }
Example #4
0
File: TssSdt.cs Project: fengqk/Art
 //compile err in Unity3D if we don't override operator--
 public static TssSdtLong operator--(TssSdtLong v)
 {
     TssSdtLong obj = new TssSdtLong();
     if (v == null)
     {
         obj.SetValue(-1);
     }
     else
     {
         long new_v = v.GetValue();
         new_v -= 1;
         obj.SetValue(new_v);
     }
     return obj;
 }
Example #5
0
File: TssSdt.cs Project: fengqk/Art
 //reserver for custom memory pool imp
 public static TssSdtLong NewTssSdtLong()
 {
     TssSdtLong obj = new TssSdtLong();
     obj.m_slot = TssSdtLongSlot.NewSlot(null);
     return obj;
 }