From db1c069cc688dc16520a78465ca5feb8500c98c9 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Sun, 27 Apr 2025 20:30:36 +0200 Subject: [PATCH] MT#59962 AmSessionContainer: move app_params When building up the AmSession and assigning the app parameters to it, do the move operation instead of copying. Fixes defect: 569 // ... and do nothing ! 570 571 DBG("onInvite/onRefer returned NULL\n"); 572 } 573 else { 574 // save session parameters >>> CID 550234: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "app_params" is copied in call to copy assignment for class "std::map, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > >", when it could be moved instead. 575 session->app_params = app_params; 576 } 577 578 return session; 579 } 580 Change-Id: I3502a4c36ab6ef24fe53d57e2d5fb01777232b2b --- core/AmSessionContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/AmSessionContainer.cpp b/core/AmSessionContainer.cpp index befb2672..547e1063 100644 --- a/core/AmSessionContainer.cpp +++ b/core/AmSessionContainer.cpp @@ -572,7 +572,7 @@ AmSession* AmSessionContainer::createSession(const AmSipRequest& req, } else { // save session parameters - session->app_params = app_params; + session->app_params = std::move(app_params); } return session;