Uses shared_ptr on variable names

This commit is contained in:
Felipe Zimmerle
2017-08-24 18:18:55 -03:00
parent 9d062f53a7
commit 003a8e8e5f
10 changed files with 38 additions and 46 deletions

View File

@@ -64,7 +64,7 @@ void RemoteUser::evaluate(Transaction *transaction,
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
var = new collection::Variable(l->at(0)->m_key,
&transaction->m_variableRemoteUser);
std::make_shared<std::string>(transaction->m_variableRemoteUser));
for (auto &i : l->at(0)->m_orign) {
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());

View File

@@ -143,7 +143,6 @@ class VariableModificatorCount : public Variable {
res = new std::string(std::to_string(count));
val = new collection::Variable(&m_name, res);
val->m_dynamic_value = true;
val->m_dynamic = true;
l->push_back(val);

View File

@@ -127,7 +127,6 @@ void XML::evaluate(Transaction *t,
if (content != NULL) {
collection::Variable *var = new collection::Variable(&m_name,
new std::string(content));
var->m_dynamic_value = true;
l->push_back(var);
xmlFree(content);
}

View File

@@ -41,7 +41,6 @@ class XML_NoDictElement : public Variable {
m_plain("[XML document tree]"),
m_var(&m_name, &m_plain) {
m_var.m_dynamic = false;
m_var.m_dynamic_value = false;
}
void evaluate(Transaction *transaction,