-
Notifications
You must be signed in to change notification settings - Fork 29
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
TraitBase
isImbued
and isImbuedTo
#818
TraitBase
isImbued
and isImbuedTo
#818
Conversation
TraitBase
isImbued
and isImbuedTo
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.
Fabulouse'.
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 sneaky one that slipped the net:
ensuring the data holds that trait via `isValid`, or |
a3aeeae
to
28d2303
Compare
Fixed in 28d2303 |
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 @feltech, FFTSAMAYL
Part of OpenAssetIO#815. For symmetry with `imbue` and `imbueTo` methods, rename the `isValid` method to `isImbued.` Signed-off-by: David Feltell <david.feltell@foundry.com>
Closes OpenAssetIO#815. For C++ in particular, where performance is likely a concern, constructing a `TraitBase`-derived instance, just to check `isImbued`, is wasteful. So add a static `isImbuedTo` (for symmetry with `imbueTo`), which tests a `TraitsData` without unnecessary temporary construction. Signed-off-by: David Feltell <david.feltell@foundry.com>
28d2303
to
9d5de0b
Compare
Description
Closes #815
For symmetry with
imbue
andimbueTo
methods, rename theisValid
method toisImbued.
For C++ in particular, where performance is likely a concern, constructing a
TraitBase
-derived instance, just to checkisImbued
, is wasteful. So add a staticisImbuedTo
(for symmetry withimbueTo
), which tests aTraitsData
without unnecessary temporaryconstruction.