httprpc: Optimise -rpcauthfile loading slightly

This commit is contained in:
Luke Dashjr 2023-10-10 01:57:23 +00:00
parent 004e3f8cee
commit 541f7284c0

View File

@ -269,7 +269,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;