Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
MKleusberg committed Aug 26, 2016
1 parent 9a7e042 commit 5fe2876
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sqlitetablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ sqlb::ForeignKeyClause SqliteTableModel::getForeignKeyClause(int column) const
// foreign key on that column.

sqlb::ConstraintPtr ptr = obj.table.constraint(obj.table.fields().at(column), sqlb::Constraint::ForeignKeyConstraintType);
if(ptr && ptr.data())
return *(reinterpret_cast<sqlb::ForeignKeyClause*>(ptr.data()));
if(ptr)
return *(ptr.dynamicCast<sqlb::ForeignKeyClause>());
}

static const sqlb::ForeignKeyClause empty_foreign_key_clause;
Expand Down

0 comments on commit 5fe2876

Please sign in to comment.