summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2025-08-12 09:23:49 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2025-08-12 10:31:21 +0200
commit9258d93a60ef0c2ec84895329eabdee12447913d (patch)
tree5841763d158f75c568073c6816a290e555d59e86
parent2b72f2b3ef94452ae649fc6a44bec049f1acb173 (diff)
cid#1660438 Variable copied when it could be movedHEADmaster
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.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--src/DllPlugInTester/CommandLineParser.cpp5
-rw-r--r--src/cppunit/TestSuiteBuilderContext.cpp3
2 files changed, 3 insertions, 5 deletions
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