diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-04-01 20:58:27 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-01 21:24:45 +0100 |
commit | 086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch) | |
tree | 02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/Applications/SoundPlayer | |
parent | 0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff) | |
download | serenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip |
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Applications/SoundPlayer')
7 files changed, 12 insertions, 12 deletions
diff --git a/Userland/Applications/SoundPlayer/M3UParser.cpp b/Userland/Applications/SoundPlayer/M3UParser.cpp index 5b32bff491..8454d03781 100644 --- a/Userland/Applications/SoundPlayer/M3UParser.cpp +++ b/Userland/Applications/SoundPlayer/M3UParser.cpp @@ -24,7 +24,7 @@ NonnullOwnPtr<M3UParser> M3UParser::from_file(const String path) return from_memory(String { contents, NoChomp }, use_utf8); } -NonnullOwnPtr<M3UParser> M3UParser::from_memory(const String& m3u_contents, bool utf8) +NonnullOwnPtr<M3UParser> M3UParser::from_memory(String const& m3u_contents, bool utf8) { auto parser = make<M3UParser>(); VERIFY(!m3u_contents.is_null() && !m3u_contents.is_empty() && !m3u_contents.is_whitespace()); @@ -38,7 +38,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info) auto vec = make<Vector<M3UEntry>>(); if (m_use_utf8) { - //TODO: Implement M3U8 parsing + // TODO: Implement M3U8 parsing TODO(); return vec; } @@ -75,7 +75,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info) auto display_name = ext_inf.value().substring_view(seconds.length() + 1); VERIFY(!display_name.is_empty() && !display_name.is_null() && !display_name.is_empty()); metadata_for_next_file.track_display_title = display_name; - //TODO: support the alternative, non-standard #EXTINF value of a key=value dictionary + // TODO: support the alternative, non-standard #EXTINF value of a key=value dictionary continue; } if (auto playlist = tag("#PLAYLIST:"); playlist.has_value()) @@ -88,7 +88,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info) metadata_for_next_file.album_artist = move(ext_art.value()); else if (auto ext_genre = tag("#EXTGENRE:"); ext_genre.has_value()) metadata_for_next_file.album_genre = move(ext_genre.value()); - //TODO: Support M3A files (M3U files with embedded mp3 files) + // TODO: Support M3A files (M3U files with embedded mp3 files) } return vec; diff --git a/Userland/Applications/SoundPlayer/M3UParser.h b/Userland/Applications/SoundPlayer/M3UParser.h index d87b07ed95..31d3a7d71e 100644 --- a/Userland/Applications/SoundPlayer/M3UParser.h +++ b/Userland/Applications/SoundPlayer/M3UParser.h @@ -33,7 +33,7 @@ struct M3UEntry { class M3UParser { public: static NonnullOwnPtr<M3UParser> from_file(String path); - static NonnullOwnPtr<M3UParser> from_memory(const String& m3u_contents, bool utf8); + static NonnullOwnPtr<M3UParser> from_memory(String const& m3u_contents, bool utf8); NonnullOwnPtr<Vector<M3UEntry>> parse(bool include_extended_info); diff --git a/Userland/Applications/SoundPlayer/PlaybackManager.cpp b/Userland/Applications/SoundPlayer/PlaybackManager.cpp index bbaf720a34..fad0b1a7b1 100644 --- a/Userland/Applications/SoundPlayer/PlaybackManager.cpp +++ b/Userland/Applications/SoundPlayer/PlaybackManager.cpp @@ -66,7 +66,7 @@ void PlaybackManager::loop(bool loop) m_loop = loop; } -void PlaybackManager::seek(const int position) +void PlaybackManager::seek(int const position) { if (!m_loader) return; diff --git a/Userland/Applications/SoundPlayer/PlaybackManager.h b/Userland/Applications/SoundPlayer/PlaybackManager.h index 2959855fa9..e4fa03eef6 100644 --- a/Userland/Applications/SoundPlayer/PlaybackManager.h +++ b/Userland/Applications/SoundPlayer/PlaybackManager.h @@ -22,7 +22,7 @@ public: void play(); void stop(); void pause(); - void seek(const int position); + void seek(int const position); void loop(bool); bool toggle_pause(); void set_loader(NonnullRefPtr<Audio::Loader>&&); diff --git a/Userland/Applications/SoundPlayer/Playlist.cpp b/Userland/Applications/SoundPlayer/Playlist.cpp index 96f09f8001..69db139f07 100644 --- a/Userland/Applications/SoundPlayer/Playlist.cpp +++ b/Userland/Applications/SoundPlayer/Playlist.cpp @@ -51,12 +51,12 @@ void Playlist::try_fill_missing_info(Vector<M3UEntry>& entries, StringView path) entry.extended_info->track_display_title = LexicalPath::title(entry.path); if (!entry.extended_info->track_length_in_seconds.has_value()) { - //TODO: Implement embedded metadata extractor for other audio formats + // TODO: Implement embedded metadata extractor for other audio formats if (auto reader = Audio::Loader::create(entry.path); !reader.is_error()) entry.extended_info->track_length_in_seconds = reader.value()->total_samples() / reader.value()->sample_rate(); } - //TODO: Implement a metadata parser for the uncomfortably numerous popular embedded metadata formats + // TODO: Implement a metadata parser for the uncomfortably numerous popular embedded metadata formats } for (auto& entry : to_delete) diff --git a/Userland/Applications/SoundPlayer/PlaylistWidget.cpp b/Userland/Applications/SoundPlayer/PlaylistWidget.cpp index f954c93489..b5881d7bd7 100644 --- a/Userland/Applications/SoundPlayer/PlaylistWidget.cpp +++ b/Userland/Applications/SoundPlayer/PlaylistWidget.cpp @@ -19,7 +19,7 @@ PlaylistWidget::PlaylistWidget() m_table_view->set_selection_mode(GUI::AbstractView::SelectionMode::SingleSelection); m_table_view->set_selection_behavior(GUI::AbstractView::SelectionBehavior::SelectRows); m_table_view->set_highlight_selected_rows(true); - m_table_view->on_doubleclick = [&](const Gfx::Point<int>& point) { + m_table_view->on_doubleclick = [&](Gfx::Point<int> const& point) { auto player = dynamic_cast<Player*>(window()->main_widget()); auto index = m_table_view->index_at_event_position(point); if (!index.is_valid()) @@ -50,7 +50,7 @@ GUI::Variant PlaylistModel::data(const GUI::ModelIndex& index, GUI::ModelRole ro } if (role == GUI::ModelRole::Sort) return data(index, GUI::ModelRole::Display); - if (role == static_cast<GUI::ModelRole>(PlaylistModelCustomRole::FilePath)) //path + if (role == static_cast<GUI::ModelRole>(PlaylistModelCustomRole::FilePath)) // path return m_playlist_items[index.row()].path; return {}; diff --git a/Userland/Applications/SoundPlayer/PlaylistWidget.h b/Userland/Applications/SoundPlayer/PlaylistWidget.h index d4c10360ad..e1260fd20e 100644 --- a/Userland/Applications/SoundPlayer/PlaylistWidget.h +++ b/Userland/Applications/SoundPlayer/PlaylistWidget.h @@ -39,7 +39,7 @@ class PlaylistTableView : public GUI::TableView { public: void doubleclick_event(GUI::MouseEvent& event) override; - Function<void(const Gfx::Point<int>&)> on_doubleclick; + Function<void(Gfx::Point<int> const&)> on_doubleclick; private: PlaylistTableView(); |