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
committed by Felipe Zimmerle
parent 8fa4fc67af
commit 820396f784
24 changed files with 255 additions and 172 deletions

View File

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