mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 09:00:35 +00:00
cql3: cleanup: Drop redundant optional<>
shared_ptr<> is already optional.
This commit is contained in:
@@ -67,16 +67,16 @@ public:
|
||||
protected:
|
||||
// Term involved in the operation. In theory this should not be here since some operation
|
||||
// may require none of more than one term, but most need 1 so it simplify things a bit.
|
||||
const std::experimental::optional<::shared_ptr<term>> _t;
|
||||
const ::shared_ptr<term> _t;
|
||||
|
||||
operation(::shared_ptr<config::column_definition> column_, std::experimental::optional<::shared_ptr<term>> t)
|
||||
operation(::shared_ptr<config::column_definition> column_, ::shared_ptr<term> t)
|
||||
: column{column_}
|
||||
, _t{t}
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual bool uses_function(sstring ks_name, sstring function_name) const {
|
||||
return _t && _t.value()->uses_function(ks_name, function_name);
|
||||
return _t && _t->uses_function(ks_name, function_name);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -137,15 +137,15 @@ public:
|
||||
return true;
|
||||
#endif
|
||||
for (auto&& operation : _column_operations) {
|
||||
if (operation && operation.value()->uses_function(ks_name, function_name))
|
||||
if (operation && operation->uses_function(ks_name, function_name))
|
||||
return true;
|
||||
}
|
||||
for (auto&& condition : _column_conditions) {
|
||||
if (condition && condition.value()->uses_function(ks_name, function_name))
|
||||
if (condition && condition->uses_function(ks_name, function_name))
|
||||
return true;
|
||||
}
|
||||
for (auto&& condition : _static_conditions) {
|
||||
if (condition && condition.value()->uses_function(ks_name, function_name))
|
||||
if (condition && condition->uses_function(ks_name, function_name))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user