Skip to content
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

fix: Taking in parameters by const reference #104

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

EmperorYP7
Copy link
Member

Signed-off-by: Yash Pandey (YP) yash.btech.cs19@iiitranchi.ac.in

Description

The internal, RBAC, and Enforcer public APIs contained functions that were copying all the parameters by value. This might result in multiple allocations for logically same data. This code will help in reducing the number of allocations by taking in parameters as const reference.

Signed-off-by: Yash Pandey (YP) <yash.btech.cs19@iiitranchi.ac.in>
@EmperorYP7 EmperorYP7 changed the title Fix: Taking in parameters by const reference fix: Taking in parameters by const reference Jun 3, 2021
Signed-off-by: Yash Pandey (YP) <yash.btech.cs19@iiitranchi.ac.in>
@hsluoyz hsluoyz requested review from xcaptain and divy9881 June 4, 2021 01:05
@hsluoyz
Copy link
Member

hsluoyz commented Jun 4, 2021

@xcaptain @divy9881

Copy link

@xcaptain xcaptain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general clean up, looks good to me.

@hsluoyz hsluoyz merged commit e8f4e17 into casbin:master Jun 4, 2021
@github-actions
Copy link

github-actions bot commented Jun 4, 2021

🎉 This PR is included in version 1.18.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@EmperorYP7 EmperorYP7 deleted the const-ref branch June 7, 2021 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants