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

Make many functions const #91

Merged
merged 2 commits into from
Mar 6, 2020
Merged

Conversation

nvzqz
Copy link
Contributor

@nvzqz nvzqz commented Nov 30, 2019

The point is to set up repeated components or boilerplate before their use sites.

The majority of these make sense as const. However, some functions such as those regarding state may not make sense as const.

The point is to set up repeated components or boilerplate before their
use sites.

The majority of these make sense as `const`. However, some functions
such as those regarding state may not make sense as `const`.
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thanks!

However, some functions such as those regarding state may not make sense as const.

Yes, I believe the methods min, max, size, bounds, and is_focused should be left as is. I cannot picture a const use case for those. I have rarely used const fn, though. What do you think?

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

I have removed the const from all the widget methods, as they cannot be reused between views yet.

We can merge this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants