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

Use std::move to save a copy #3948

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Use std::move to save a copy #3948

wants to merge 1 commit into from

Conversation

wujingyue
Copy link
Collaborator

No description provided.

@wujingyue
Copy link
Collaborator Author

!test

@wujingyue wujingyue requested a review from zasdfgbnm February 23, 2025 18:42
Copy link

Description

  • Use std::move to avoid unnecessary copying

Changes walkthrough 📝

Relevant files
Enhancement
expr_simplifier.cpp
Use `std::move` for `assumptions`                                               

csrc/expr_simplifier.cpp

  • Replaced copy of assumptions with std::move
+1/-1     

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
⚡ Recommended focus areas for review

Possible Issue

The use of std::move on assumptions may lead to undefined behavior if assumptions is used after this point in the function. Ensure that assumptions is not accessed again after being moved.

const Context context(variables, std::move(assumptions), preserve_error);

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.

1 participant