refactor: Avoid copies by using const references or by move-construction

This commit is contained in:
MarcoFalke
2025-01-13 21:39:03 +01:00
parent 2d380aee43
commit faf0c2d942
10 changed files with 15 additions and 13 deletions

View File

@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(util_datadir)
struct TestArgsManager : public ArgsManager
{
TestArgsManager() { m_network_only_args.clear(); }
void ReadConfigString(const std::string str_config)
void ReadConfigString(const std::string& str_config)
{
std::istringstream streamConfig(str_config);
{
@@ -63,7 +63,7 @@ struct TestArgsManager : public ArgsManager
std::string error;
BOOST_REQUIRE(ReadConfigStream(streamConfig, "", error));
}
void SetNetworkOnlyArg(const std::string arg)
void SetNetworkOnlyArg(const std::string& arg)
{
LOCK(cs_args);
m_network_only_args.insert(arg);