some code refactoring
This commit is contained in:
@@ -356,9 +356,7 @@ Index<IndexValue> * Table::get_index(const std::string &index_name) {
|
||||
return idx.get_index_name() == index_name;
|
||||
});
|
||||
|
||||
if (it != m_indexes.end()) return &(*it);
|
||||
|
||||
return nullptr;
|
||||
return (it != m_indexes.end()) ? &(*it) : nullptr;
|
||||
}
|
||||
|
||||
Index<IndexValue> * Table::get_index_for_column(const std::string &col_name) {
|
||||
@@ -367,9 +365,7 @@ Index<IndexValue> * Table::get_index_for_column(const std::string &col_name) {
|
||||
return idx.get_column_name() == col_name;
|
||||
});
|
||||
|
||||
if (it != m_indexes.end()) return &(*it);
|
||||
|
||||
return nullptr;
|
||||
return (it != m_indexes.end()) ? &(*it) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user