Avoids string copy by working with pointers while resolving variables

This commit is contained in:
Felipe Zimmerle
2016-12-27 15:25:11 -03:00
parent 7834cf857b
commit a7f465cf3a
38 changed files with 179 additions and 94 deletions

View File

@@ -57,9 +57,10 @@ void RemoteUser::evaluateInternal(Transaction *transaction,
if (pos == std::string::npos) {
return;
}
base64 = std::string(base64, 0, pos);
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
l->push_back(new collection::Variable("REMOTE_USER", base64));
l->push_back(new collection::Variable(&m_retName,
&transaction->m_variableRemoteUser));
}