diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/modules/m_sqlauth.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/modules/m_sqlauth.cpp')
| -rw-r--r-- | src/modules/m_sqlauth.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 51304fdfa..1ad66a8bc 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -191,11 +191,11 @@ class ModuleSQLAuth : public Module userinfo["pass"] = user->password; userinfo["certfp"] = sslapi ? sslapi->GetFingerprint(user) : ""; - for (std::vector<std::string>::const_iterator it = hash_algos.begin(); it != hash_algos.end(); ++it) + for (const auto& algo : hash_algos) { - HashProvider* hashprov = ServerInstance->Modules.FindDataService<HashProvider>("hash/" + *it); + HashProvider* hashprov = ServerInstance->Modules.FindDataService<HashProvider>("hash/" + algo); if (hashprov && !hashprov->IsKDF()) - userinfo[*it + "pass"] = hashprov->Generate(user->password); + userinfo[algo + "pass"] = hashprov->Generate(user->password); } SQL->Submit(new AuthQuery(this, user->uuid, pendingExt, verbose, kdf, pwcolumn), freeformquery, userinfo); |
