diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /llvm/include/llvm/Support/BinaryStreamArray.h | |
parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) |
Notes
Diffstat (limited to 'llvm/include/llvm/Support/BinaryStreamArray.h')
-rw-r--r-- | llvm/include/llvm/Support/BinaryStreamArray.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/include/llvm/Support/BinaryStreamArray.h b/llvm/include/llvm/Support/BinaryStreamArray.h index 67ba2e4189be..1634983d26ce 100644 --- a/llvm/include/llvm/Support/BinaryStreamArray.h +++ b/llvm/include/llvm/Support/BinaryStreamArray.h @@ -133,9 +133,9 @@ public: Extractor &getExtractor() { return E; } BinaryStreamRef getUnderlyingStream() const { return Stream; } - void setUnderlyingStream(BinaryStreamRef S, uint32_t Skew = 0) { - Stream = S; - this->Skew = Skew; + void setUnderlyingStream(BinaryStreamRef NewStream, uint32_t NewSkew = 0) { + Stream = NewStream; + Skew = NewSkew; } void drop_front() { Skew += begin()->length(); } @@ -143,7 +143,7 @@ public: private: BinaryStreamRef Stream; Extractor E; - uint32_t Skew; + uint32_t Skew = 0; }; template <typename ValueType, typename Extractor> @@ -274,6 +274,7 @@ public: return !(*this == Other); } + FixedStreamArray(const FixedStreamArray &) = default; FixedStreamArray &operator=(const FixedStreamArray &) = default; const T &operator[](uint32_t Index) const { @@ -323,6 +324,8 @@ public: FixedStreamArrayIterator(const FixedStreamArray<T> &Array, uint32_t Index) : Array(Array), Index(Index) {} + FixedStreamArrayIterator<T>(const FixedStreamArrayIterator<T> &Other) + : Array(Other.Array), Index(Other.Index) {} FixedStreamArrayIterator<T> & operator=(const FixedStreamArrayIterator<T> &Other) { Array = Other.Array; |