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)))) |
Collaborator
There was a problem hiding this comment.
shouldn't this third part also have URDFDOM_HEADERS_MAJOR_VERSION >= x?
Member
Author
There was a problem hiding this comment.
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.
Collaborator
There was a problem hiding this comment.
thanks for the explanation. I guess I don't remember the order of precedence between || and && operators
jslee02
added a commit
that referenced
this pull request
Oct 17, 2016
Support urdfdom_headers 1.0 for DART 5.1 (backport of #766)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
urdfdom_headers1.0 is released with API changes. The major change was replacingboostwith C++11, which is a relatively small change.This pull request adds support of
urdfdom_headers1.0 using different type aliasings depending on theurdfdom_headersversions.This should fix the build failures on Ubuntu
yakkety.This change is