diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 87f9c7145b..c010ea479a 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -334,7 +334,7 @@ static bool InitRPCAuthentication() } } if (gArgs.GetArg("-rpcauthfile", "") != "") { - for (std::string path : gArgs.GetArgs("-rpcauthfile")) { + for (const std::string& path : gArgs.GetArgs("-rpcauthfile")) { std::ifstream file; file.open(path); if (!file.is_open()) continue;