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
tsoc
openmm
Commits
ae36b287
Commit
ae36b287
authored
Apr 19, 2010
by
Christopher Bruns
Browse files
Added parenthesis workaround for using std::min/max on Windows, to prevent compile error.
parent
86f95f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
libraries/lepton/include/lepton/Operation.h
libraries/lepton/include/lepton/Operation.h
+4
-2
No files found.
libraries/lepton/include/lepton/Operation.h
View file @
ae36b287
...
@@ -992,7 +992,8 @@ public:
...
@@ -992,7 +992,8 @@ public:
return
new
Min
();
return
new
Min
();
}
}
double
evaluate
(
double
*
args
,
const
std
::
map
<
std
::
string
,
double
>&
variables
)
const
{
double
evaluate
(
double
*
args
,
const
std
::
map
<
std
::
string
,
double
>&
variables
)
const
{
return
std
::
min
(
args
[
0
],
args
[
1
]);
// parens around (std::min) are workaround for horrible microsoft max/min macro trouble
return
(
std
::
min
)(
args
[
0
],
args
[
1
]);
}
}
ExpressionTreeNode
differentiate
(
const
std
::
vector
<
ExpressionTreeNode
>&
children
,
const
std
::
vector
<
ExpressionTreeNode
>&
childDerivs
,
const
std
::
string
&
variable
)
const
;
ExpressionTreeNode
differentiate
(
const
std
::
vector
<
ExpressionTreeNode
>&
children
,
const
std
::
vector
<
ExpressionTreeNode
>&
childDerivs
,
const
std
::
string
&
variable
)
const
;
};
};
...
@@ -1014,7 +1015,8 @@ public:
...
@@ -1014,7 +1015,8 @@ public:
return
new
Max
();
return
new
Max
();
}
}
double
evaluate
(
double
*
args
,
const
std
::
map
<
std
::
string
,
double
>&
variables
)
const
{
double
evaluate
(
double
*
args
,
const
std
::
map
<
std
::
string
,
double
>&
variables
)
const
{
return
std
::
max
(
args
[
0
],
args
[
1
]);
// parens around (std::min) are workaround for horrible microsoft max/min macro trouble
return
(
std
::
max
)(
args
[
0
],
args
[
1
]);
}
}
ExpressionTreeNode
differentiate
(
const
std
::
vector
<
ExpressionTreeNode
>&
children
,
const
std
::
vector
<
ExpressionTreeNode
>&
childDerivs
,
const
std
::
string
&
variable
)
const
;
ExpressionTreeNode
differentiate
(
const
std
::
vector
<
ExpressionTreeNode
>&
children
,
const
std
::
vector
<
ExpressionTreeNode
>&
childDerivs
,
const
std
::
string
&
variable
)
const
;
};
};
...
...
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