Esempio n. 1
0
        public IByteBuffer WithOrder(ByteOrder endianness)
        {
            if (endianness == this.Order)
            {
                return(this);
            }

            EmptyByteBuffer s = this.swapped;

            if (s != null)
            {
                return(s);
            }

            this.swapped = s = new EmptyByteBuffer(this.Allocator, endianness);
            return(s);
        }
Esempio n. 2
0
        public IByteBuffer WithOrder(ByteOrder endianness)
        {
            if (endianness == this.Order)
            {
                return this;
            }

            EmptyByteBuffer s = this.swapped;
            if (s != null)
            {
                return s;
            }

            this.swapped = s = new EmptyByteBuffer(this.Allocator, endianness);
            return s;
        }