Skip to content

Commit

Permalink
qt, refactor: Use enum type as switch argument in PollTableModel
Browse files Browse the repository at this point in the history
  • Loading branch information
barton2526 committed Apr 22, 2022
1 parent a5c1b83 commit 00f8ef8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt/voting/polltablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class PollTableDataModel : public QAbstractTableModel
return QString::number(row->m_vote_percent_AVW, 'f', 4);
case PollTableModel::TopAnswer:
return row->m_top_answer;
}
break;
} // no default case, so the compiler can warn about missing cases
assert(false);

case Qt::TextAlignmentRole:
switch (index.column()) {
Expand Down Expand Up @@ -102,8 +102,8 @@ class PollTableDataModel : public QAbstractTableModel
return QVariant::fromValue(row->m_vote_percent_AVW);
case PollTableModel::TopAnswer:
return row->m_top_answer;
}
break;
} // no default case, so the compiler can warn about missing cases
assert(false);
}

return QVariant();
Expand Down

0 comments on commit 00f8ef8

Please sign in to comment.