Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
f222283d
Commit
f222283d
authored
Sep 07, 2020
by
Alvarez, Gonzalo
Browse files
Ainur: Warn if a label is overwritten
parent
f3910b1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Ainur/AinurState1.cpp
View file @
f222283d
...
...
@@ -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
;
}
...
...
src/Ainur/test.cpp
View file @
f222283d
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment