From 01c50d57a67a52ee3cddd81b54d4647e9123a290 Mon Sep 17 00:00:00 2001 From: vabr-g Date: Mon, 5 Jun 2017 19:33:04 +0200 Subject: [PATCH] [C++] Remove std::move around a raw pointer in flatbuffers.h (#4339) * Remove std::move around a raw pointer Calling std::move on a raw pointer has no advantage to just copying its value. Moreover, it is confusing, because it indicates that the argument is movable in some non-trivial way (e.g., is it actually meant to be a smart pointer?). More context in https://crbug.com/729393. * Remove the move constructor altogether --- include/flatbuffers/flatbuffers.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 75daed64c..9311f8275 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -127,9 +127,6 @@ public: VectorIterator(const uint8_t *data, uoffset_t i) : data_(data + IndirectHelper::element_stride * i) {} VectorIterator(const VectorIterator &other) : data_(other.data_) {} - #ifndef FLATBUFFERS_CPP98_STL - VectorIterator(VectorIterator &&other) : data_(std::move(other.data_)) {} - #endif VectorIterator &operator=(const VectorIterator &other) { data_ = other.data_;