-
Notifications
You must be signed in to change notification settings - Fork 30
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
remove access to private data in ReferenceCounter #1811
Conversation
@@ -50,5 +51,6 @@ ReferenceCounter: class { | |||
} | |||
increase: func { this update(1) } | |||
decrease: func { this update(-1) } | |||
reset: func { this _count = 0 } |
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.
Do you want to use this on new line 46 as well?
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.
I'm not sure if this would improve readability, maybe I'll leave it.
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.
OK.
Accessing private variables is bad practice anyway, so good fix. |
Nice job @marcusnaslund , I think we've just found a serious flaw in properties 👍 |
I think the credit is all yours, most people would have just said "OK" and moved the |
But, most people doing a PR would have never suggested moving the |
Alright then. :) |
We are done with this PR, though? I can merge this? |
I guess so. Let's not forget to fill a bug report, or just redirect the ooc staff to this thread. |
Someone needs to go through the setters and make sure we fix all setter/getter pairs like this, if any. |
No new functionality, I just wanted to update it so the private data stays private (easier to replace the implementation later).
@marcusnaslund