Skip to content

Commit 4e0add7

Browse files
committed
Use std::unique_ptr for pimpl idiom in HTTP client.
1 parent ff5f714 commit 4e0add7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

http/src/http/v2/client/client.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ namespace network {
397397
: pimpl_(new impl(std::move(mock_resolver),
398398
std::move(mock_connection), options)) {}
399399

400-
client::~client() { delete pimpl_; }
400+
client::~client() { }
401401

402402
std::future<response> client::execute(request req,
403403
request_options options) {

http/src/http/v2/client/client_errors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace network {
1111
namespace http {
12-
namespace v2 {
12+
inline namespace v2 {
1313
class client_category_impl : public std::error_category {
1414

1515
public:

http/src/network/http/v2/client/client.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class client {
395395
private:
396396

397397
struct impl;
398-
impl *pimpl_;
398+
std::unique_ptr<impl> pimpl_;
399399

400400
};
401401
} // namespace v2

uri

0 commit comments

Comments
 (0)