Mercurial > minori
diff include/core/anime.h @ 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 | b5d6c27c308f |
children |
line wrap: on
line diff
--- a/include/core/anime.h Fri Jul 25 10:05:23 2025 -0400 +++ b/include/core/anime.h Fri Jul 25 10:16:02 2025 -0400 @@ -6,8 +6,8 @@ #include <array> #include <map> +#include <optional> #include <vector> -#include <optional> namespace Anime { @@ -17,12 +17,11 @@ Completed, Paused, Dropped, - Planning + Planning, }; constexpr std::array<ListStatus, 5> ListStatuses{ - ListStatus::Current, ListStatus::Completed, ListStatus::Paused, - ListStatus::Dropped, ListStatus::Planning + ListStatus::Current, ListStatus::Completed, ListStatus::Paused, ListStatus::Dropped, ListStatus::Planning, }; enum class SeriesStatus { @@ -31,16 +30,12 @@ Releasing, NotYetReleased, Cancelled, - Hiatus + Hiatus, }; constexpr std::array<SeriesStatus, 6> SeriesStatuses{ - SeriesStatus::Unknown, - SeriesStatus::Finished, - SeriesStatus::Releasing, - SeriesStatus::NotYetReleased, - SeriesStatus::Cancelled, - SeriesStatus::Hiatus + SeriesStatus::Unknown, SeriesStatus::Finished, SeriesStatus::Releasing, + SeriesStatus::NotYetReleased, SeriesStatus::Cancelled, SeriesStatus::Hiatus, }; enum class SeriesFormat { @@ -51,41 +46,39 @@ Special, Ova, Ona, - Music + Music, }; constexpr std::array<SeriesFormat, 8> SeriesFormats{ - SeriesFormat::Unknown, - SeriesFormat::Tv, - SeriesFormat::TvShort, - SeriesFormat::Movie, - SeriesFormat::Special, - SeriesFormat::Ova, - SeriesFormat::Ona, - SeriesFormat::Music + SeriesFormat::Unknown, SeriesFormat::Tv, SeriesFormat::TvShort, SeriesFormat::Movie, + SeriesFormat::Special, SeriesFormat::Ova, SeriesFormat::Ona, SeriesFormat::Music, }; enum class TitleLanguage { Romaji, Native, - English + English, }; -constexpr std::array<TitleLanguage, 3> TitleLanguages{TitleLanguage::Romaji, TitleLanguage::Native, TitleLanguage::English}; +constexpr std::array<TitleLanguage, 3> TitleLanguages{ + TitleLanguage::Romaji, + TitleLanguage::Native, + TitleLanguage::English, +}; enum class Service { None, AniList, MyAnimeList, - Kitsu + Kitsu, }; /* this doesn't include MAL and Kitsu because they aren't really * "valid" services yet. */ constexpr std::array<Service, 3> Services{ - Service::AniList, - Service::MyAnimeList, - Service::Kitsu + Service::AniList, + Service::MyAnimeList, + Service::Kitsu, }; enum class ScoreFormat { @@ -93,11 +86,12 @@ Point10Decimal, // 0.0-10.0 Point10, // 0-10 Point5, // 0-5, should be represented in stars - Point3 // 1-3, should be represented in smileys + Point3, // 1-3, should be represented in smileys }; -constexpr std::array<ScoreFormat, 5> ScoreFormats{ScoreFormat::Point100, ScoreFormat::Point10Decimal, - ScoreFormat::Point10, ScoreFormat::Point5, ScoreFormat::Point3}; +constexpr std::array<ScoreFormat, 5> ScoreFormats{ + ScoreFormat::Point100, ScoreFormat::Point10Decimal, ScoreFormat::Point10, ScoreFormat::Point5, ScoreFormat::Point3, +}; struct ListInformation { std::string id; @@ -147,17 +141,17 @@ uint64_t GetUserTimeUpdated() const; std::string GetUserNotes() const; - void SetUserId(const std::string& id); + void SetUserId(const std::string &id); void SetUserStatus(ListStatus status); void SetUserScore(int score); void SetUserProgress(int progress); - void SetUserDateStarted(const Date& started); - void SetUserDateCompleted(const Date& completed); + void SetUserDateStarted(const Date &started); + void SetUserDateCompleted(const Date &completed); void SetUserIsPrivate(bool is_private); void SetUserRewatchedTimes(int rewatched); void SetUserIsRewatching(bool rewatching); void SetUserTimeUpdated(uint64_t updated); - void SetUserNotes(const std::string& notes); + void SetUserNotes(const std::string ¬es); /* Series data */ int GetId() const; @@ -179,16 +173,16 @@ std::optional<std::string> GetServiceUrl(Service service) const; void SetId(int id); - void SetServiceId(Service service, const std::string& id); - void SetTitle(TitleLanguage language, const std::string& title); - void SetTitleSynonyms(const std::vector<std::string>& synonyms); - void AddTitleSynonym(const std::string& synonym); + void SetServiceId(Service service, const std::string &id); + void SetTitle(TitleLanguage language, const std::string &title); + void SetTitleSynonyms(const std::vector<std::string> &synonyms); + void AddTitleSynonym(const std::string &synonym); void SetEpisodes(int episodes); void SetAiringStatus(SeriesStatus status); - void SetStartedDate(const Date& date); - void SetCompletedDate(const Date& date); - void SetGenres(const std::vector<std::string>& genres); - void SetProducers(const std::vector<std::string>& producers); + void SetStartedDate(const Date &date); + void SetCompletedDate(const Date &date); + void SetGenres(const std::vector<std::string> &genres); + void SetProducers(const std::vector<std::string> &producers); void SetFormat(SeriesFormat format); void SetAudienceScore(double audience_score); void SetSynopsis(std::string synopsis);