Currently, the constructor for VReadOnlyMemoryStream takes a non-const pointer to the buffer. Since write operations are prevented and is its purpose, it should instead take a pointer to a const buffer, so that the caller can supply a read-only buffer without having to cast away const externally.
Currently, the constructor for
VReadOnlyMemoryStreamtakes a non-const pointer to the buffer. Since write operations are prevented and is its purpose, it should instead take a pointer to a const buffer, so that the caller can supply a read-only buffer without having to cast away const externally.