diff options
author | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-27 08:55:55 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-27 08:55:55 -0700 |
commit | 953fffccf8e91d5e4a49139359c46ad5141e5df7 (patch) | |
tree | b81f44f337c2504644339876901001ce99118657 /tensorflow/contrib/lite/allocation.cc | |
parent | 375c023d307a74d32f222486bb2fdd3ba96c92da (diff) | |
parent | b05a47dd10872871d08a5c7a3ee97e49fdf64098 (diff) |
Merge pull request #20711 from SneakyFish5:copied-buffer-fix
PiperOrigin-RevId: 206323345
Diffstat (limited to 'tensorflow/contrib/lite/allocation.cc')
-rw-r--r-- | tensorflow/contrib/lite/allocation.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/allocation.cc b/tensorflow/contrib/lite/allocation.cc index c42622ff02..ef6c14f085 100644 --- a/tensorflow/contrib/lite/allocation.cc +++ b/tensorflow/contrib/lite/allocation.cc @@ -99,7 +99,9 @@ FileCopyAllocation::FileCopyAllocation(const char* filename, filename); return; } - copied_buffer_ = std::move(buffer); + // Versions of GCC before 6.2.0 don't support std::move from non-const + // char[] to const char[] unique_ptrs. + copied_buffer_.reset(const_cast<char const*>(buffer.release())); } FileCopyAllocation::~FileCopyAllocation() {} |