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
6c0e3cda
Commit
6c0e3cda
authored
Sep 20, 2021
by
Alvarez, Gonzalo
Browse files
Ainur: string and integer types reworked
parent
77fff659
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Ainur/AinurState1.cpp
View file @
6c0e3cda
...
...
@@ -9,6 +9,26 @@ namespace PsimagLite {
struct
MyProxyFor
{
static
void
convert
(
long
unsigned
int
&
t
,
std
::
string
str
)
{
t
=
PsimagLite
::
atoi
(
str
);
}
static
void
convert
(
unsigned
int
&
t
,
std
::
string
str
)
{
t
=
PsimagLite
::
atoi
(
str
);
}
static
void
convert
(
long
int
&
t
,
std
::
string
str
)
{
t
=
PsimagLite
::
atoi
(
str
);
}
static
void
convert
(
int
&
t
,
std
::
string
str
)
{
t
=
PsimagLite
::
atoi
(
str
);
}
static
void
convert
(
double
&
t
,
std
::
string
str
)
{
t
=
PsimagLite
::
atof
(
str
);
...
...
@@ -25,6 +45,11 @@ struct MyProxyFor {
t
=
toComplex
<
T
>
(
str
);
}
static
void
convert
(
String
&
t
,
std
::
string
str
)
{
t
=
str
;
}
template
<
typename
T
>
static
void
convert
(
T
&
t
,
std
::
string
str
)
{
...
...
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