Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
waLBerla
waLBerla
Commits
386d5c3e
Commit
386d5c3e
authored
Jun 16, 2021
by
Christoph Schwarzmeier
Browse files
Change reference to const reference in stringToNum
parent
e48f00a3
Pipeline
#32708
passed with stages
in 281 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/stringToNum.h
View file @
386d5c3e
...
...
@@ -25,15 +25,15 @@
namespace
walberla
{
template
<
typename
S
>
inline
S
stringToNum
(
std
::
string
&
t
);
template
<
>
inline
float
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stof
(
t
);
}
template
<
>
inline
double
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stod
(
t
);
}
template
<
>
inline
long
double
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stold
(
t
);
}
template
<
>
inline
int
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stoi
(
t
);
}
template
<
>
inline
long
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stol
(
t
);
}
template
<
>
inline
long
long
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stoll
(
t
);
}
template
<
>
inline
unsigned
long
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stoul
(
t
);
}
template
<
>
inline
unsigned
long
long
stringToNum
(
std
::
string
&
t
)
{
return
std
::
stoull
(
t
);
}
inline
S
stringToNum
(
const
std
::
string
&
t
);
template
<
>
inline
float
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stof
(
t
);
}
template
<
>
inline
double
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stod
(
t
);
}
template
<
>
inline
long
double
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stold
(
t
);
}
template
<
>
inline
int
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stoi
(
t
);
}
template
<
>
inline
long
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stol
(
t
);
}
template
<
>
inline
long
long
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stoll
(
t
);
}
template
<
>
inline
unsigned
long
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stoul
(
t
);
}
template
<
>
inline
unsigned
long
long
stringToNum
(
const
std
::
string
&
t
)
{
return
std
::
stoull
(
t
);
}
}
// namespace walberla
...
...
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