httprpc: Optimise -rpcauthfile loading slightly

This commit is contained in:
Luke Dashjr 2023-10-10 01:57:23 +00:00
parent 5ad22180f6
commit d439d4a486

View File

@ -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;