-
Notifications
You must be signed in to change notification settings - Fork 876
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
Conversation
OpResult(V&& v) : v_(std::move(v)) { | ||
} | ||
|
||
OpResult(const V& v) : v_(v) { |
There was a problem hiding this comment.
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; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
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 [...] =
No description provided.