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

chore: fix clang warnings #2485

Merged
merged 2 commits into from
Jan 26, 2024
Merged

chore: fix clang warnings #2485

merged 2 commits into from
Jan 26, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Jan 26, 2024

No description provided.

dranikpg
dranikpg previously approved these changes Jan 26, 2024
@romange romange enabled auto-merge (squash) January 26, 2024 11:18
@romange romange merged commit 8a3ccff into main Jan 26, 2024
10 checks passed
@romange romange deleted the Pr4 branch January 26, 2024 15:40
Comment on lines +64 to +67
OpResult(V&& v) : v_(std::move(v)) {
}

OpResult(const V& v) : v_(v) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer to use perfect forwarding in such cases

@@ -816,7 +816,7 @@ void ClusterFamily::DflyMigrateFullSyncCut(CmdArgList args, ConnectionContext* c
std::lock_guard lck(migration_mu_);
auto migration_it =
std::find_if(incoming_migrations_jobs_.begin(), incoming_migrations_jobs_.end(),
[sync_id](const auto& el) { return el->GetSyncId() == sync_id; });
[sync_id = sync_id](const auto& el) { return el->GetSyncId() == sync_id; });
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

clang-12 does not compile this when we capture variables that were defined via auto [...] =

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.

None yet

3 participants