thrift: capture "this" explicitly in lambda
C++20 deprecates capturing this in default-copy lambdas ([=]), with good reason. Move to explicit captures to avoid any ambiguity and reduce warning spew. Message-Id: <20200517151023.754906-1-avi@scylladb.com>
This commit is contained in:
@@ -607,7 +607,7 @@ public:
|
||||
throw make_exception<InvalidRequestException>("keyspace not set");
|
||||
}
|
||||
|
||||
return _query_state.get_client_state().has_column_family_access(current_keyspace(), cfname, auth::permission::MODIFY).then([=] {
|
||||
return _query_state.get_client_state().has_column_family_access(current_keyspace(), cfname, auth::permission::MODIFY).then([this, cfname] {
|
||||
if (_db.local().find_schema(current_keyspace(), cfname)->is_view()) {
|
||||
throw make_exception<InvalidRequestException>("Cannot truncate Materialized Views");
|
||||
}
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
}
|
||||
void system_drop_column_family(thrift_fn::function<void(std::string const& _return)> cob, thrift_fn::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family) {
|
||||
with_cob(std::move(cob), std::move(exn_cob), [&] {
|
||||
return _query_state.get_client_state().has_column_family_access(current_keyspace(), column_family, auth::permission::DROP).then([=] {
|
||||
return _query_state.get_client_state().has_column_family_access(current_keyspace(), column_family, auth::permission::DROP).then([this, column_family] {
|
||||
auto& cf = _db.local().find_column_family(current_keyspace(), column_family);
|
||||
if (cf.schema()->is_view()) {
|
||||
throw make_exception<InvalidRequestException>("Cannot drop Materialized Views from Thrift");
|
||||
@@ -873,7 +873,7 @@ public:
|
||||
throw NotFoundException();
|
||||
}
|
||||
|
||||
return _query_state.get_client_state().has_keyspace_access(keyspace, auth::permission::DROP).then([=] {
|
||||
return _query_state.get_client_state().has_keyspace_access(keyspace, auth::permission::DROP).then([this, keyspace] {
|
||||
return service::get_local_migration_manager().announce_keyspace_drop(keyspace, false).then([this] {
|
||||
return std::string(_db.local().get_version().to_sstring());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user