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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy