Skip to content

Commit

Permalink
Avoid warning deprecated-copy-with-user-provided-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Sep 27, 2024
1 parent a71a5c8 commit bb478ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/eckit/codec/Stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Stream::Stream(DataHandle* datahandle) : shared_(datahandle), ptr_(shared_.get()

Stream::Stream(std::shared_ptr<DataHandle> datahandle) : shared_(datahandle), ptr_(shared_.get()) {}

Stream::Stream(const Stream& other) = default;

DataHandle& Stream::datahandle() {
ASSERT(ptr_ != nullptr);
return *ptr_;
Expand Down
7 changes: 5 additions & 2 deletions src/eckit/codec/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ class Stream {
/// the referenced datahandle
Stream(DataHandle&);

/// Assignment constructor sharing datahandle with other Stream
Stream(const Stream&);
/// Assignment/Copy constructor sharing datahandle with other Stream
Stream(const Stream&) = default;
Stream(Stream&&) = default;
Stream& operator=(const Stream&) = default;
Stream& operator=(Stream&&) = default;

/// Access internal DataHandle
DataHandle& datahandle();
Expand Down

0 comments on commit bb478ce

Please sign in to comment.