This repository was archived by the owner on Mar 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +14
-20
lines changed Expand file tree Collapse file tree 5 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -1337,14 +1337,12 @@ class http_pipeline_stage : public std::enable_shared_from_this<http_pipeline_st
13371337{
13381338public:
13391339
1340- http_pipeline_stage () {}
1340+ http_pipeline_stage () = default ;
13411341
13421342 http_pipeline_stage & operator =(const http_pipeline_stage &) = delete ;
13431343 http_pipeline_stage (const http_pipeline_stage &) = delete ;
13441344
1345- virtual ~http_pipeline_stage ()
1346- {
1347- }
1345+ virtual ~http_pipeline_stage () = default ;
13481346
13491347 // / <summary>
13501348 // / Runs this stage against the given request and passes onto the next stage.
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ namespace details
5151{
5252
5353#if defined(_WIN32)
54- const utility::char_t * get_with_body_err_msg = _XPLATSTR(" A GET or HEAD request should not have an entity body." );
54+ extern const utility::char_t * get_with_body_err_msg = _XPLATSTR(" A GET or HEAD request should not have an entity body." );
5555#endif
5656
5757void request_context::complete_headers ()
Original file line number Diff line number Diff line change @@ -317,6 +317,9 @@ class winhttp_client : public _http_client_communicator
317317 , m_hSession(nullptr )
318318 , m_hConnection(nullptr ) { }
319319
320+ winhttp_client (const winhttp_client&) = delete ;
321+ winhttp_client &operator =(const winhttp_client&) = delete ;
322+
320323 // Closes session.
321324 ~winhttp_client ()
322325 {
@@ -1289,10 +1292,6 @@ class winhttp_client : public _http_client_communicator
12891292 HINTERNET m_hSession;
12901293 HINTERNET m_hConnection;
12911294 bool m_secure;
1292-
1293- // No copy or assignment.
1294- winhttp_client (const winhttp_client&) = delete ;
1295- winhttp_client &operator =(const winhttp_client&) = delete ;
12961295};
12971296
12981297std::shared_ptr<_http_client_communicator> create_platform_final_pipeline_stage (uri base_uri, const http_client_config& client_config)
Original file line number Diff line number Diff line change @@ -359,6 +359,9 @@ class winrt_client : public _http_client_communicator
359359 winrt_client (http::uri address, http_client_config client_config)
360360 : _http_client_communicator(std::move(address), std::move(client_config)) { }
361361
362+ winrt_client (const winrt_client&) = delete ;
363+ winrt_client &operator =(const winrt_client&) = delete ;
364+
362365 virtual pplx::task<http_response> propagate (http_request request) override
363366 {
364367 auto self = std::static_pointer_cast<_http_client_communicator>(shared_from_this ());
@@ -555,12 +558,6 @@ class winrt_client : public _http_client_communicator
555558 });
556559 }
557560 }
558-
559- private:
560-
561- // No copy or assignment.
562- winrt_client (const winrt_client&) = delete ;
563- winrt_client &operator =(const winrt_client&) = delete ;
564561};
565562
566563std::shared_ptr<_http_client_communicator> create_platform_final_pipeline_stage (uri base_uri, const http_client_config& client_config)
Original file line number Diff line number Diff line change @@ -47,19 +47,19 @@ utility::string_t http_headers::content_type() const
4747// / Helper functions to convert a series of bytes from a charset to utf-8 or utf-16.
4848// / These APIs deal with checking for and handling byte order marker (BOM).
4949namespace {
50- enum endian_ness
50+ enum endianness
5151 {
5252 little_endian,
5353 big_endian,
5454 unknown
5555 };
56- endian_ness check_byte_order_mark (const utf16string &str)
56+ endianness check_byte_order_mark (const utf16string &str)
5757 {
5858 if (str.empty ())
5959 {
6060 return unknown;
6161 }
62- const unsigned char *src = ( const unsigned char *) & str[ 0 ] ;
62+ const unsigned char *src = reinterpret_cast < const unsigned char *>( str. data ()) ;
6363
6464 // little endian
6565 if (src[0 ] == 0xFF && src[1 ] == 0xFE )
@@ -142,7 +142,7 @@ namespace {
142142
143143 std::string convert_utf16_to_utf8 (utf16string src)
144144 {
145- const endian_ness endian = check_byte_order_mark (src);
145+ const endianness endian = check_byte_order_mark (src);
146146 switch (endian)
147147 {
148148 case little_endian:
@@ -158,7 +158,7 @@ namespace {
158158
159159 utf16string convert_utf16_to_utf16 (utf16string src)
160160 {
161- const endian_ness endian = check_byte_order_mark (src);
161+ const endianness endian = check_byte_order_mark (src);
162162 switch (endian)
163163 {
164164 case little_endian:
You can’t perform that action at this time.
0 commit comments