cql3: cleanup: Drop redundant optional<>

shared_ptr<> is already optional.
This commit is contained in:
Tomasz Grabiec
2015-01-23 13:11:55 +01:00
parent 90a43b5556
commit fc2bc5558e
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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;