Commit f222283d authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Ainur: Warn if a label is overwritten

parent f3910b1c
......@@ -180,6 +180,10 @@ void AinurState::assign(String k, String v)
err(errLabel(ERR_PARSE_UNDECLARED, k));
assert(static_cast<SizeType>(x) < values_.size());
if (values_[x] != "")
std::cerr<<"Overwriting label "<<k<<" with "<<v<<"\n";
values_[x] = v;
}
......
......@@ -12,6 +12,10 @@ void partiallyReadSomething(const PsimagLite::Ainur& ainur)
//std::vector<double> v;
ainur.readValue(v, "myv");
std::cout<<v;
PsimagLite::String m;
ainur.readValue(m, "Model");
std::cout<<m<<"\n";
}
int main(int argc, char** argv)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment