Loading libs/vr/libpdx/private/pdx/utility.h +3 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #define ANDROID_PDX_UTILITY_H_ #include <cstdint> #include <cstdlib> #include <iterator> #include <pdx/rpc/sequence.h> Loading @@ -23,6 +24,7 @@ class ByteBuffer { if (other.size()) memcpy(data_, other.data(), other.size()); } ~ByteBuffer() { std::free(data_); } ByteBuffer& operator=(const ByteBuffer& other) { resize(other.size()); Loading Loading @@ -69,7 +71,7 @@ class ByteBuffer { size |= size >> 8; size |= size >> 16; size++; void* new_data = data_ ? realloc(data_, size) : malloc(size); void* new_data = data_ ? std::realloc(data_, size) : std::malloc(size); // TODO(avakulenko): Check for allocation failures. data_ = static_cast<uint8_t*>(new_data); capacity_ = size; Loading Loading
libs/vr/libpdx/private/pdx/utility.h +3 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #define ANDROID_PDX_UTILITY_H_ #include <cstdint> #include <cstdlib> #include <iterator> #include <pdx/rpc/sequence.h> Loading @@ -23,6 +24,7 @@ class ByteBuffer { if (other.size()) memcpy(data_, other.data(), other.size()); } ~ByteBuffer() { std::free(data_); } ByteBuffer& operator=(const ByteBuffer& other) { resize(other.size()); Loading Loading @@ -69,7 +71,7 @@ class ByteBuffer { size |= size >> 8; size |= size >> 16; size++; void* new_data = data_ ? realloc(data_, size) : malloc(size); void* new_data = data_ ? std::realloc(data_, size) : std::malloc(size); // TODO(avakulenko): Check for allocation failures. data_ = static_cast<uint8_t*>(new_data); capacity_ = size; Loading