Example #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);
        }
Example #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;
        }