mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Some inline + remove useless const&.
This commit is contained in:
@@ -43,15 +43,15 @@ public:
|
||||
Meta();
|
||||
~Meta() { this->SaveCall(); };
|
||||
|
||||
std::string GetUpdated(std::string unistoreName, std::string entry) const;
|
||||
int GetMarks(std::string unistoreName, std::string entry) const;
|
||||
bool UpdateAvailable(std::string unistoreName, std::string entry, std::string updated) const;
|
||||
std::string GetUpdated(const std::string &unistoreName, const std::string &entry) const;
|
||||
int GetMarks(const std::string &unistoreName, const std::string &entry) const;
|
||||
bool UpdateAvailable(const std::string &unistoreName, const std::string &entry, const std::string &updated) const;
|
||||
|
||||
void SetUpdated(std::string unistoreName, std::string entry, std::string updated) {
|
||||
void SetUpdated(const std::string &unistoreName, const std::string &entry, const std::string &updated) {
|
||||
this->metadataJson[unistoreName][entry]["updated"] = updated;
|
||||
};
|
||||
|
||||
void SetMarks(std::string unistoreName, std::string entry, int marks) {
|
||||
void SetMarks(const std::string &unistoreName, const std::string &entry, int marks) {
|
||||
this->metadataJson[unistoreName][entry]["marks"] = marks;
|
||||
};
|
||||
|
||||
|
||||
+10
-10
@@ -45,17 +45,17 @@ public:
|
||||
std::string GetUniStoreAuthor() const;
|
||||
|
||||
/* Get Information of the UniStore Entries. */
|
||||
std::string GetTitleEntry(const int &index) const;
|
||||
std::string GetAuthorEntry(const int &index) const;
|
||||
std::string GetDescriptionEntry(const int &index) const;
|
||||
std::vector<std::string> GetCategoryIndex(const int &index) const;
|
||||
std::string GetVersionEntry(const int &index) const;
|
||||
std::vector<std::string> GetConsoleEntry(const int &index) const;
|
||||
std::string GetLastUpdatedEntry(const int &index) const;
|
||||
std::string GetLicenseEntry(const int &index) const;
|
||||
C2D_Image GetIconEntry(const int &index) const;
|
||||
std::string GetTitleEntry(int index) const;
|
||||
std::string GetAuthorEntry(int index) const;
|
||||
std::string GetDescriptionEntry(int index) const;
|
||||
std::vector<std::string> GetCategoryIndex(int index) const;
|
||||
std::string GetVersionEntry(int index) const;
|
||||
std::vector<std::string> GetConsoleEntry(int index) const;
|
||||
std::string GetLastUpdatedEntry(int index) const;
|
||||
std::string GetLicenseEntry(int index) const;
|
||||
C2D_Image GetIconEntry(int index) const;
|
||||
|
||||
std::vector<std::string> GetDownloadList(const int &index) const;
|
||||
std::vector<std::string> GetDownloadList(int index) const;
|
||||
|
||||
int GetStoreSize() const { return (int)this->storeJson["storeContent"].size(); };
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
class StoreEntry {
|
||||
public:
|
||||
StoreEntry(const std::unique_ptr<Store> &store, const std::unique_ptr<Meta> &meta, const int &index);
|
||||
StoreEntry(const std::unique_ptr<Store> &store, const std::unique_ptr<Meta> &meta, int index);
|
||||
|
||||
std::string GetTitle() const { return this->Title; };
|
||||
std::string GetAuthor() const { return this->Author; };
|
||||
@@ -54,9 +54,9 @@ public:
|
||||
std::vector<std::string> GetConsoleFull() const { return this->FullConsole; };
|
||||
|
||||
bool GetUpdateAvl() const { return this->UpdateAvailable; };
|
||||
void SetUpdateAvl(const bool &v) { this->UpdateAvailable = v; };
|
||||
void SetUpdateAvl(bool v) { this->UpdateAvailable = v; };
|
||||
|
||||
void SetMark(const int &marks) {
|
||||
void SetMark(int marks) {
|
||||
this->Marks = marks;
|
||||
this->MarkString = StringUtils::GetMarkString(this->Marks);
|
||||
};
|
||||
|
||||
@@ -41,42 +41,42 @@ enum class SortType : uint8_t {
|
||||
namespace StoreUtils {
|
||||
/* Grid. */
|
||||
void DrawGrid(const std::unique_ptr<Store> &store, const std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||
void GridLogic(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||
void GridLogic(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||
|
||||
/* Top List. */
|
||||
void DrawList(const std::unique_ptr<Store> &store, const std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||
void ListLogic(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||
void ListLogic(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||
|
||||
/* Entry Info. */
|
||||
void DrawEntryInfo(const std::unique_ptr<Store> &store, const std::unique_ptr<StoreEntry> &entry);
|
||||
void EntryHandle(u32 hDown, u32 hHeld, touchPosition touch, bool &showMark, bool &fetch);
|
||||
void EntryHandle(bool &showMark, bool &fetch);
|
||||
|
||||
/* Side Menu. */
|
||||
void DrawSideMenu(const int ¤tMenu);
|
||||
void SideMenuHandle(u32 hDown, touchPosition touch, int ¤tMenu, bool &fetch);
|
||||
void DrawSideMenu(int currentMenu);
|
||||
void SideMenuHandle(int ¤tMenu, bool &fetch);
|
||||
|
||||
/* Download Entries. */
|
||||
void DrawDownList(const std::unique_ptr<Store> &store, const std::vector<std::string> &entries, const bool &fetch);
|
||||
void DownloadHandle(u32 hDown, u32 hHeld, touchPosition touch, const std::unique_ptr<Store> &store, const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &entries, int ¤tMenu, std::unique_ptr<Meta> &meta, const int &lastMode, int &smallDelay);
|
||||
void DrawDownList(const std::unique_ptr<Store> &store, const std::vector<std::string> &entries, bool fetch);
|
||||
void DownloadHandle(const std::unique_ptr<Store> &store, const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &entries, int ¤tMenu, std::unique_ptr<Meta> &meta, const int &lastMode, int &smallDelay);
|
||||
|
||||
/* Search + Favorite Menu. */
|
||||
void DrawSearchMenu(const std::vector<bool> &searchIncludes, const std::string &searchResult, const int &marks, const bool &updateFilter);
|
||||
void SearchHandle(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::vector<bool> &searchIncludes, std::unique_ptr<Meta> &meta, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype);
|
||||
void DrawSearchMenu(const std::vector<bool> &searchIncludes, const std::string &searchResult, int marks, bool updateFilter);
|
||||
void SearchHandle(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::vector<bool> &searchIncludes, std::unique_ptr<Meta> &meta, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype);
|
||||
|
||||
/* Mark Menu. */
|
||||
void DisplayMarkBox(const int &marks);
|
||||
void MarkHandle(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<StoreEntry> &entry, const std::unique_ptr<Store> &store, bool &showMark, std::unique_ptr<Meta> &meta);
|
||||
void DisplayMarkBox(int marks);
|
||||
void MarkHandle(std::unique_ptr<StoreEntry> &entry, const std::unique_ptr<Store> &store, bool &showMark, std::unique_ptr<Meta> &meta);
|
||||
|
||||
/* Credits. */
|
||||
void DrawCredits();
|
||||
|
||||
/* Settings. */
|
||||
void DrawSettings(const int &page, const int &selection, const int &sPos);
|
||||
void SettingsHandle(u32 hDown, u32 hHeld, touchPosition touch, int &page, bool &dspSettings, int &storeMode, int &selection, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::unique_ptr<Meta> &meta, int &sPos);
|
||||
void DrawSettings(int page, int selection, int sPos);
|
||||
void SettingsHandle(int &page, bool &dspSettings, int &storeMode, int &selection, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::unique_ptr<Meta> &meta, int &sPos);
|
||||
|
||||
/* Sorting. */
|
||||
void DrawSorting(const bool &asc, const SortType &st);
|
||||
void SortHandle(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, bool &asc, SortType &st);
|
||||
void DrawSorting(bool asc, SortType st);
|
||||
void SortHandle(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, bool &asc, SortType &st);
|
||||
|
||||
bool compareTitleDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||
bool compareTitleAscending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||
@@ -87,7 +87,7 @@ namespace StoreUtils {
|
||||
bool compareUpdateDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||
bool compareUpdateAscending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||
|
||||
void SortEntries(const bool &Ascending, const SortType &sorttype, std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||
void SortEntries(bool Ascending, SortType sorttype, std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||
|
||||
void search(std::vector<std::unique_ptr<StoreEntry>> &entries, const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user