Reduce the workload on VariableValue

Last compute at the last minute, if needed.
This commit is contained in:
Felipe Zimmerle
2020-09-17 19:51:34 -03:00
parent 44791be5e0
commit 09ec92e66a
22 changed files with 249 additions and 169 deletions

View File

@@ -45,9 +45,9 @@ void TimeMin::evaluate(Transaction *transaction,
localtime_r(&timer, &timeinfo);
strftime(tstr, 200, "%M", &timeinfo);
transaction->m_variableTimeMin.assign(tstr);
l->push_back(std::make_shared<VariableValue>(&m_retName, &transaction->m_variableTimeMin));
l->push_back(std::make_shared<VariableValue>(
std::unique_ptr<std::string>(new std::string(tstr)),
&m_retName));
}