mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
Piano: Use size_t for track count
This commit is contained in:
parent
876f00e635
commit
d757027638
2 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ ErrorOr<void> PlayerWidget::initialize()
|
|||
m_track_dropdown->set_model_column(0);
|
||||
m_track_dropdown->set_selected_index(0);
|
||||
m_track_dropdown->on_change = [this]([[maybe_unused]] auto name, GUI::ModelIndex model_index) {
|
||||
m_track_manager.set_current_track(model_index.row());
|
||||
m_track_manager.set_current_track(static_cast<size_t>(model_index.row()));
|
||||
};
|
||||
|
||||
m_add_track_button = TRY(try_add<GUI::Button>());
|
||||
|
|
|
@ -27,10 +27,10 @@ public:
|
|||
~TrackManager() = default;
|
||||
|
||||
NonnullRefPtr<DSP::NoteTrack> current_track() { return *m_tracks[m_current_track]; }
|
||||
int track_count() { return m_tracks.size(); };
|
||||
size_t track_count() { return m_tracks.size(); };
|
||||
void set_current_track(size_t track_index)
|
||||
{
|
||||
VERIFY((int)track_index < track_count());
|
||||
VERIFY(track_index < track_count());
|
||||
m_current_track = track_index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue