-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Replace boost::equality_comparable
with explicit implementation of operator!=
in pxr/usd/sdf
#2237
Conversation
Filed as internal issue #USD-7965 |
f55e121
to
f772db0
Compare
…`operator!=` in `pxr/usd/sdf`
@@ -146,6 +143,7 @@ struct SdfNamespaceEditDetail : | |||
const std::string& reason); | |||
|
|||
SDF_API bool operator==(const SdfNamespaceEditDetail& rhs) const; |
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.
Just a nitpick. Since == uses "rhs", != should use "rhs" too
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.
Done
Sdf.NamespaceEdit('/A', '/B'), | ||
"reason" | ||
) | ||
self.assertTrue(prototype == prototype) |
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.
The prototype == prototype test case would be more robust if it were
self.assertTrue(prototype == Sdf.NamespaceEditDetail(
 Sdf.NamespaceEditDetail.Okay,
 Sdf.NamespaceEdit('/A', '/B'),
 "reason"
 )
Same for !=
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.
Done, I also switched the tests to use assertEqual
and assertNotEqual
which is preferred per https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertFalse
c4ef3f8
to
47e6cb3
Compare
Description of Change(s)
operator!=
toSdfAllowed
,SdfChildrenProxy
,SdfNamespaceEdit
,SdfNamespaceEditDetail
, andSdfUnregisteredValue
Sdf.NamespaceEdit
,Sdf.NamespaceEditDetail
, andSdf.UnregisteredValue
.Fixes Issue(s)
boost::equality_comparable
can be replaced with explicitoperator!=
implementation #2236