Refactoring: Place m_variables inside Collections

This commit is contained in:
Felipe Zimmerle
2015-10-29 12:39:09 -03:00
parent 787be98122
commit b6ae0585cd
13 changed files with 253 additions and 261 deletions

View File

@@ -53,12 +53,12 @@ std::string MacroExpansion::expand(const std::string& input, Assay *assay) {
std::string *variableValue;
size_t collection = variable.find(".");
if (collection == std::string::npos) {
variableValue = assay->m_variables.resolveFirst(variable);
variableValue = assay->m_collections.resolveFirst(variable);
} else {
std::string col = std::string(variable, 0, collection);
std::string var = std::string(variable, collection + 1,
variable.length() - (collection + 1));
variableValue = assay->m_variables.resolveFirst(col, var);
variableValue = assay->m_collections.resolveFirst(col, var);
}
res.erase(start, end - start + 2);