src/DllPlugInTester/CommandLineParser.cpp | 5 ++--- src/cppunit/TestSuiteBuilderContext.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-)
New commits: commit 9258d93a60ef0c2ec84895329eabdee12447913d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Aug 12 09:23:49 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Aug 12 10:31:21 2025 +0200 cid#1660438 Variable copied when it could be moved and cid#1660250 Variable copied when it could be moved cid#1660081 Variable copied when it could be moved Change-Id: If0c91b74bc0119c7d6e565537974b060532a1ef0 Reviewed-on: https://gerrit.libreoffice.org/c/cppunit/+/189407 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/src/DllPlugInTester/CommandLineParser.cpp b/src/DllPlugInTester/CommandLineParser.cpp index 1ad0245..5f72c53 100644 --- a/src/DllPlugInTester/CommandLineParser.cpp +++ b/src/DllPlugInTester/CommandLineParser.cpp @@ -14,8 +14,7 @@ CommandLineParser::CommandLineParser( int argc, { for ( int index =1; index < argc; ++index ) { - std::string argument( argv[index ] ); - m_arguments.push_back( argument ); + m_arguments.emplace_back(argv[index ]); } } @@ -78,7 +77,7 @@ CommandLineParser::readNonOptionCommands() plugIn.m_parameters = CPPUNIT_NS::PlugInParameters( parameters ); } - m_plugIns.push_back( plugIn ); + m_plugIns.push_back(std::move(plugIn)); getNextArgument(); } diff --git a/src/cppunit/TestSuiteBuilderContext.cpp b/src/cppunit/TestSuiteBuilderContext.cpp index 5e4347e..b826120 100644 --- a/src/cppunit/TestSuiteBuilderContext.cpp +++ b/src/cppunit/TestSuiteBuilderContext.cpp @@ -66,8 +66,7 @@ TestSuiteBuilderContextBase::addProperty( const std::string &key, } } - Property property( key, value ); - m_properties.push_back( property ); + m_properties.emplace_back(key, value); } const std::string