Commit 41228e0d32b94cfc5a6b7d78958a5b7210d20b93
1 parent
38f45c73
Add default special member functions to `Stream` class
Implement default constructor, copy/move constructors, and assignment operators for `Stream`. Add overloads for initializing `Stream` with `QPDFObjectHandle`.
Showing
2 changed files
with
17 additions
and
1 deletions
libqpdf/QPDF_Stream.cc
libqpdf/qpdf/QPDFObjectHandle_private.hh
| ... | ... | @@ -445,6 +445,23 @@ namespace qpdf |
| 445 | 445 | { |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | + Stream() = default; | |
| 449 | + Stream(Stream const&) = default; | |
| 450 | + Stream(Stream&&) = default; | |
| 451 | + Stream& operator=(Stream const&) = default; | |
| 452 | + Stream& operator=(Stream&&) = default; | |
| 453 | + ~Stream() = default; | |
| 454 | + | |
| 455 | + Stream(QPDFObjectHandle const& oh) : | |
| 456 | + BaseHandle(oh.type_code() == ::ot_stream ? oh : QPDFObjectHandle()) | |
| 457 | + { | |
| 458 | + } | |
| 459 | + | |
| 460 | + Stream(QPDFObjectHandle&& oh) : | |
| 461 | + BaseHandle(oh.type_code() == ::ot_stream ? std::move(oh) : QPDFObjectHandle()) | |
| 462 | + { | |
| 463 | + } | |
| 464 | + | |
| 448 | 465 | Stream( |
| 449 | 466 | QPDF& qpdf, |
| 450 | 467 | QPDFObjGen og, | ... | ... |