Dwarrowdelf.Client.TileSetLoader.ParseSizes C# (CSharp) Method

ParseSizes() static private method

static private ParseSizes ( string sizeStr ) : uint
sizeStr string
return uint
        static uint ParseSizes(string sizeStr)
        {
            if (sizeStr == null)
                return 0;

            uint mask = 0;

            foreach (var str in sizeStr.Split(','))
            {
                uint s = uint.Parse(str);

                if (IsPowerOfTwo(s) == false)
                    throw new Exception();

                mask |= s;
            }

            return mask;
        }