mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
cylinders: remove redundant index check in the model
There is a warning when the code tries to access a non-existing cylinder, since that indicates that something went out of sync. However, this warning can never trigger because the bounds are checked before. Remove the first of the two redundant checks. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8afb0dedc9
commit
3466d0c44d
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ bool CylindersModel::cylinderUsed(int i) const
|
||||||
|
|
||||||
QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!d || !index.isValid() || index.row() >= d->cylinders.nr)
|
if (!d || !index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (index.row() >= d->cylinders.nr) {
|
if (index.row() >= d->cylinders.nr) {
|
||||||
|
|
Loading…
Reference in a new issue