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

@@ -45,7 +45,10 @@ void TimeSec::evaluateInternal(Transaction *transaction,
localtime_r(&timer, &timeinfo);
strftime(tstr, 200, "%S", &timeinfo);
l->push_back(new collection::Variable("TIME_SEC", std::string(tstr)));
transaction->m_variableTimeSec.assign(tstr);
l->push_back(new collection::Variable(&m_retName,
&transaction->m_variableTimeSec));
}