File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
include/opentelemetry/exporters/otlp Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,10 @@ class OtlpHttpClient
237237 HttpSessionData () = default ;
238238
239239 explicit HttpSessionData (
240- std::shared_ptr<opentelemetry::ext::http::client::Session> input_session,
241- std::shared_ptr<opentelemetry::ext::http::client::EventHandler> input_handle)
242- {
243- session.swap (input_session);
244- event_handle.swap (input_handle);
245- }
240+ std::shared_ptr<opentelemetry::ext::http::client::Session> &&input_session,
241+ std::shared_ptr<opentelemetry::ext::http::client::EventHandler> &&input_handle)
242+ : session(std::move(input_session)), event_handle(std::move(input_handle))
243+ {}
246244 };
247245
248246 /* *
Original file line number Diff line number Diff line change @@ -1000,8 +1000,9 @@ OtlpHttpClient::createSession(
10001000
10011001 // Returns the created session data
10021002 return HttpSessionData{
1003- session, std::shared_ptr<opentelemetry::ext::http::client::EventHandler>{
1004- new ResponseHandler (std::move (result_callback), options_.console_debug )}};
1003+ std::move (session),
1004+ std::shared_ptr<opentelemetry::ext::http::client::EventHandler>{
1005+ new ResponseHandler (std::move (result_callback), options_.console_debug )}};
10051006}
10061007
10071008void OtlpHttpClient::addSession (HttpSessionData &&session_data) noexcept
You can’t perform that action at this time.
0 commit comments