Allow empty anchored variable to use

This commit is contained in:
Ervin Hegedus
2019-02-05 23:14:36 +00:00
committed by Felipe Zimmerle
parent b392a1ca36
commit a6e6bc2b5f
2 changed files with 48 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ void AnchoredVariable::append(const std::string &a, size_t offset,
void AnchoredVariable::evaluate(std::vector<const VariableValue *> *l) {
if (m_name.empty() || m_value.empty()) {
if (m_name.empty()) {
return;
}
@@ -121,9 +121,6 @@ void AnchoredVariable::evaluate(std::vector<const VariableValue *> *l) {
std::string * AnchoredVariable::evaluate() {
if (m_value.empty() == true) {
return NULL;
}
return &m_value;
}