diff include/core/anime_db.h @ 177:122fad646f81

anime/db: upgrade to c++17 style, make things easier to read
author Paper <mrpapersonic@gmail.com>
date Fri, 01 Dec 2023 13:32:29 -0500
parents 9b10175be389
children 862d0d8619f6
line wrap: on
line diff
--- a/include/core/anime_db.h	Fri Dec 01 13:12:26 2023 -0500
+++ b/include/core/anime_db.h	Fri Dec 01 13:32:29 2023 -0500
@@ -11,23 +11,20 @@
 class Database {
 	public:
 		std::unordered_map<int, Anime> items;
-		int GetTotalAnimeAmount();
-		int GetTotalEpisodeAmount();
-		int GetTotalWatchedAmount();
-		int GetTotalPlannedAmount();
+		size_t GetTotalAnimeAmount();
+		size_t GetTotalEpisodeAmount();
+		size_t GetTotalWatchedAmount();
+		size_t GetTotalPlannedAmount();
 		double GetAverageScore();
 		double GetScoreDeviation();
-		int GetListsAnimeAmount(ListStatus status);
+		size_t GetListsAnimeAmount(ListStatus status);
 		int GetAnimeFromTitle(const std::string& title);
 
 		bool GetDatabaseAsJSON(nlohmann::json& json);
 		bool SaveDatabaseToDisk();
 
 		bool ParseDatabaseJSON(const nlohmann::json& json);
-		bool LoadDatabaseFromFile();
-
-	protected:
-		bool ParseAnimeInfoJSON(const nlohmann::json& json);
+		bool LoadDatabaseFromDisk();
 };
 
 extern Database db;