C++: use size_t everywhere as index in our models

cc #2024
This commit is contained in:
Olivier Goffart 2023-02-07 12:06:01 +01:00 committed by Olivier Goffart
parent 1370bd771f
commit eaa9db4911
9 changed files with 91 additions and 72 deletions

View file

@ -9,8 +9,8 @@ using slint::interpreter::Value;
struct InkLevelModel : slint::Model<Value>
{
int row_count() const override { return m_data.size(); }
std::optional<Value> row_data(int i) const override
size_t row_count() const override { return m_data.size(); }
std::optional<Value> row_data(size_t i) const override
{
if (i < m_data.size())
return { m_data[i] };