diff src/core/anime.cc @ 393:963047512d34

*: clang-format
author Paper <paper@tflc.us>
date Fri, 07 Nov 2025 07:16:15 -0500
parents 27c462bc7815
children
line wrap: on
line diff
--- a/src/core/anime.cc	Fri Nov 07 07:10:32 2025 -0500
+++ b/src/core/anime.cc	Fri Nov 07 07:16:15 2025 -0500
@@ -84,29 +84,31 @@
 		return "";
 
 	switch (session.config.anime_list.score_format) {
-		case ScoreFormat::Point10Decimal:
-			return Strings::ToUtf8String(score / 10) + "." + Strings::ToUtf8String(score % 10);
-		case ScoreFormat::Point10: return Strings::ToUtf8String(score / 10);
-		case ScoreFormat::Point5: {
-			std::string stars = "";
+	case ScoreFormat::Point10Decimal:
+		return Strings::ToUtf8String(score / 10) + "." + Strings::ToUtf8String(score % 10);
+	case ScoreFormat::Point10:
+		return Strings::ToUtf8String(score / 10);
+	case ScoreFormat::Point5: {
+		std::string stars = "";
 
-			for (int i = 0; i < 100; i += 20)
-				stars.append((i <= score) ? "★" : "☆");
+		for (int i = 0; i < 100; i += 20)
+			stars.append((i <= score) ? "★" : "☆");
 
-			return stars;
-		}
-		case ScoreFormat::Point3: {
-			if (score >= 100)
-				return ":)";
-			else if (score >= 66)
-				return ":|";
-			else if (score >= 33)
-				return ":(";
-			else
-				return "";
-		}
-		default:
-		case ScoreFormat::Point100: return Strings::ToUtf8String(score);
+		return stars;
+	}
+	case ScoreFormat::Point3: {
+		if (score >= 100)
+			return ":)";
+		else if (score >= 66)
+			return ":|";
+		else if (score >= 33)
+			return ":(";
+		else
+			return "";
+	}
+	default:
+	case ScoreFormat::Point100:
+		return Strings::ToUtf8String(score);
 	}
 }
 
@@ -332,8 +334,10 @@
 		return std::nullopt;
 
 	switch (service) {
-		case Service::AniList: return "https://anilist.co/anime/" + id.value();
-		default: return "";
+	case Service::AniList:
+		return "https://anilist.co/anime/" + id.value();
+	default:
+		return "";
 	}
 }