diff src/track/media.cc @ 369:47c9f8502269

*: clang-format all the things I've edited the formatting a bit. Now pointer asterisks (and reference ampersands) are on the variable instead of the type, as well as having newlines for function braces (but nothing else)
author Paper <paper@tflc.us>
date Fri, 25 Jul 2025 10:16:02 -0400
parents 886f66775f31
children
line wrap: on
line diff
--- a/src/track/media.cc	Fri Jul 25 10:05:23 2025 -0400
+++ b/src/track/media.cc	Fri Jul 25 10:16:02 2025 -0400
@@ -18,11 +18,12 @@
 namespace Track {
 namespace Media {
 
-static bool GetCurrentlyPlayingResults(std::vector<animone::Result>& results) {
+static bool GetCurrentlyPlayingResults(std::vector<animone::Result> &results)
+{
 	std::vector<animone::Player> players;
 
 	players.reserve(session.config.recognition.players.size());
-	for (const auto& [enabled, player] : session.config.recognition.players)
+	for (const auto &[enabled, player] : session.config.recognition.players)
 		if (enabled && player.type == animone::PlayerType::Default)
 			players.push_back(player);
 
@@ -34,7 +35,8 @@
  * standard. However, window titles are not, and for some obscure X11
  * window managers, WILL not be in UTF-8. I don't care enough about this
  * to do anything about it though. */
-bool GetCurrentlyPlaying(std::vector<std::string>& vec) {
+bool GetCurrentlyPlaying(std::vector<std::string> &vec)
+{
 	std::vector<animone::Result> results;
 
 	if (!GetCurrentlyPlayingResults(results))
@@ -42,9 +44,9 @@
 
 	bool success = false;
 
-	for (const auto& result : results) {
-		for (const auto& media : result.media) {
-			for (const auto& info : media.information) {
+	for (const auto &result : results) {
+		for (const auto &media : result.media) {
+			for (const auto &info : media.information) {
 				switch (info.type) {
 					case animone::MediaInfoType::File:
 						vec.push_back(std::filesystem::path(info.value).filename().u8string());
@@ -54,10 +56,8 @@
 						vec.push_back(info.value);
 						success |= true;
 						break;
-					case animone::MediaInfoType::Tab:
-						break;
-					case animone::MediaInfoType::Url:
-						break;
+					case animone::MediaInfoType::Tab: break;
+					case animone::MediaInfoType::Url: break;
 					default: break;
 				}
 			}