core: move add_cylinder() to struct cylinder_table

Feels natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-07-02 14:49:25 +02:00 committed by bstoeger
parent 22a1120b30
commit 80b5f6bfcd
6 changed files with 12 additions and 13 deletions

View file

@ -492,7 +492,7 @@ void CylindersModel::add()
int row = static_cast<int>(d->cylinders.size());
cylinder_t cyl = create_new_manual_cylinder(d);
beginInsertRows(QModelIndex(), row, row);
add_cylinder(&d->cylinders, row, std::move(cyl));
d->cylinders.add(row, std::move(cyl));
++numRows;
endInsertRows();
emit dataChanged(createIndex(row, 0), createIndex(row, COLUMNS - 1));