コード例 #1
0
        protected void GetWidth(out int min, out int max, int count)
        {
            min = Int32.MaxValue;
            max = 0;
            bool empty = true;

            for (int i = 0; i < count; ++i)
            {
                Expression e = Expressions[i];
                if (e == null)
                {
                    continue;
                }

                empty = false;
                int a, b;
                e.GetWidth(out a, out b);
                if (a < min)
                {
                    min = a;
                }
                if (b > max)
                {
                    max = b;
                }
            }

            if (empty)
            {
                min = max = 0;
            }
        }
コード例 #2
0
        protected void GetWidth(out int min, out int max, int count)
        {
            min = int.MaxValue;
            max = 0;
            bool flag = true;

            for (int i = 0; i < count; i++)
            {
                Expression expression = this.Expressions[i];
                if (expression != null)
                {
                    flag = false;
                    int num;
                    int num2;
                    expression.GetWidth(out num, out num2);
                    if (num < min)
                    {
                        min = num;
                    }
                    if (num2 > max)
                    {
                        max = num2;
                    }
                }
            }
            if (flag)
            {
                min = (max = 0);
            }
        }
コード例 #3
0
 public override void GetWidth(out int min, out int max)
 {
     Expression.GetWidth(out min, out max);
     min = min * this.min;
     if (max == Int32.MaxValue || this.max == 0xffff)
     {
         max = Int32.MaxValue;
     }
     else
     {
         max = max * this.max;
     }
 }
コード例 #4
0
 public override void GetWidth(out int min, out int max)
 {
     min = 0;
     max = 0;
     foreach (object obj in base.Expressions)
     {
         Expression expression = (Expression)obj;
         int        num;
         int        num2;
         expression.GetWidth(out num, out num2);
         min += num;
         if (max == 2147483647 || num2 == 2147483647)
         {
             max = int.MaxValue;
         }
         else
         {
             max += num2;
         }
     }
 }