Merge pull request #3214 from gberkes/v3/Use_the_init-statement_to_declare_pos_inside_the_if_statement

Refactor: used the init-statement to declare "pos" inside the if statement
This commit is contained in:
Ervin Hegedus 2024-08-07 14:33:02 +02:00 committed by GitHub
commit e8db92ebb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,8 +56,7 @@ void RemoteUser::evaluate(Transaction *transaction,
base64 = Utils::Base64::decode(base64); base64 = Utils::Base64::decode(base64);
const auto pos = base64.find(":"); if (const auto pos{base64.find(":")}; pos != std::string::npos) {
if (pos != std::string::npos) {
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos)); transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
auto var = std::make_unique<VariableValue>(&v->getKeyWithCollection(), auto var = std::make_unique<VariableValue>(&v->getKeyWithCollection(),