-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
C#: Replace StringNameCache
with SNAME
#81073
C#: Replace StringNameCache
with SNAME
#81073
Conversation
This is not equivalent but uses the same syntax as |
You are right, the only one that seems to be used in multiple places is
Renaming them would break compatibility since these are names of methods exposed in Object so I don't expect them to change. |
|
The performance is the same, there's only the extra memory cost (in this case very minimal). |
You should probably remove the actual godot/modules/mono/csharp_script.cpp Line 71 in 713bfaf
|
Not only is it unused it doesn't work any more |
2d5c6ae
to
6d7d083
Compare
For the record, GDScript seems to have a similar pattern:
|
I'm not sure, in GDScript's case they may use them more often. Are you saying we should keep using the same pattern in the .NET module?
As I understand it, the only benefit of using this struct over
I can only find one usage, maybe you got it mixed up with |
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.
Seems good to me.
Thanks! |
StringNameCache
was a struct that has existed beforeSNAME
that seems to have the same purpose, now it's no longer needed.