Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tobias WEBER
in20tools_old
Commits
de969364
Commit
de969364
authored
Mar 27, 2019
by
Tobias WEBER
Browse files
small bugfix
parent
817abb9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs/str.h
View file @
de969364
...
...
@@ -887,8 +887,8 @@ t_val call_func2(const t_str& strName, t_val t1, t_val t2)
{
static
const
std
::
unordered_map
<
/*t_str*/
std
::
string
,
std
::
function
<
t_val
(
t_val
,
t_val
)
>>
s_funcs
=
{
{
"pow"
,
[
t1
,
t2
](
t_val
t1
,
t_val
t2
)
->
t_val
{
return
t_val
(
std
::
pow
(
t1
,
t2
));
}
},
{
"mod"
,
[
t1
,
t2
](
t_val
t1
,
t_val
t2
)
->
t_val
{
return
t1
%
t2
;
}
},
{
"pow"
,
[](
t_val
t1
,
t_val
t2
)
->
t_val
{
return
t_val
(
std
::
pow
(
t1
,
t2
));
}
},
{
"mod"
,
[](
t_val
t1
,
t_val
t2
)
->
t_val
{
return
t1
%
t2
;
}
},
};
return
s_funcs
.
at
(
wstr_to_str
(
strName
))(
t1
,
t2
);
...
...
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