| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
| 3 | // | ||
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/cppalliance/beast2 | ||
| 8 | // | ||
| 9 | |||
| 10 | #include <boost/beast2/server/body_source.hpp> | ||
| 11 | |||
| 12 | namespace boost { | ||
| 13 | namespace beast2 { | ||
| 14 | |||
| 15 | 9 | body_source:: | |
| 16 | 5 | ~body_source() | |
| 17 | { | ||
| 18 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 5 times.
|
9 | if(! impl_) |
| 19 | 4 | return; | |
| 20 | 5 | impl_->~impl(); | |
| 21 | 5 | ::operator delete(impl_); | |
| 22 | 9 | } | |
| 23 | |||
| 24 | body_source& | ||
| 25 | 3 | body_source:: | |
| 26 | operator=(body_source&& other) noexcept | ||
| 27 | { | ||
| 28 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | if(&other == this) |
| 29 | ✗ | return *this; | |
| 30 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 2 times.
|
3 | if(impl_) |
| 31 | { | ||
| 32 | 1 | impl_->~impl(); | |
| 33 | 1 | ::operator delete(impl_); | |
| 34 | } | ||
| 35 | 3 | impl_ = other.impl_; | |
| 36 | 3 | other.impl_ = nullptr; | |
| 37 | 3 | return *this; | |
| 38 | } | ||
| 39 | |||
| 40 | } // beast2 | ||
| 41 | } // boost | ||
| 42 |