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

Simplify captured variable type #22102

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

Chocobo1
Copy link
Member

@Chocobo1 Chocobo1 commented Jan 4, 2025

By capturing the specific data instead of torrent handle the lambda can become non-mutable.

@Chocobo1 Chocobo1 added the Code cleanup Clean up the code while preserving the same outcome label Jan 4, 2025
@Chocobo1 Chocobo1 added this to the 5.1 milestone Jan 4, 2025
glassez
glassez previously approved these changes Jan 4, 2025
@Chocobo1 Chocobo1 changed the title Move construct captured data Simplify captured variable type Jan 4, 2025
@Chocobo1
Copy link
Member Author

Chocobo1 commented Jan 4, 2025

PR updated. I noticed the inner lambda can just capture torrentHandle.info_hash() instead of torrentHandle and therefore the lambda doesn't need mutable anymore.

@Chocobo1 Chocobo1 requested a review from a team January 4, 2025 13:22
By capturing the specific data instead of torrent handle the lambda can become non-mutable.
@Chocobo1 Chocobo1 merged commit 22e156e into qbittorrent:master Jan 6, 2025
14 checks passed
@Chocobo1 Chocobo1 deleted the capture_this branch January 6, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code cleanup Clean up the code while preserving the same outcome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants