-
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
GetAttr inconsistently returning by copy or by const reference #2617
Comments
Sounds unintentional to me.
|
Here is a more thorough list then:
This makes me think like that instance may be the only |
Filed as internal issue #USD-8617 |
stage.h and prim.h must return by value, because the objects are not retained by UsdStage or UsdPrim. SO it does look like output.h is the only site that can and should change. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Issue
I'm working on wrapping some of OpenUSD with Rust, and I ran into the issue that some types return UsdAttribute either by const reference or by value.
Specifically, UsdGeomPrimvar has the signature
UsdAttribute const & UsdGeomPrimvar::GetAttr()const
, as does UsdShadeInput, but UsdShadeOutput hasUsdAttribute UsdShadeOutput::GetAttr() const
.Unless that causes other issues, it would be convenient for me if they could all return a constant reference, or if necessary, by value.
Or is there maybe a reason for this I've missed?
I have not checked where else this may be applied inconsistently.
Steps to Reproduce
System Information (OS, Hardware)
NA
Package Versions
23.08
Build Flags
NA
The text was updated successfully, but these errors were encountered: