A bunch of minor tweaks from cppcheck

This commit is contained in:
Pk11
2021-03-26 06:01:37 -05:00
parent e06d475131
commit c95d66f0e4
19 changed files with 110 additions and 204 deletions
-2
View File
@@ -107,8 +107,6 @@ namespace StoreUtils {
void search(const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl, bool isAND);
void FilterUpdateAvailable();
void ResetAll();
void RefreshUpdateAVL();
-1
View File
@@ -56,7 +56,6 @@ struct UniStoreInfo {
bool nameEndsWith(const std::string &name, const std::vector<std::string> &extensionList);
void getDirectoryContents(std::vector<DirEntry> &dirContents, const std::vector<std::string> &extensionList);
void getDirectoryContents(std::vector<DirEntry> &dirContents);
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
std::vector<UniStoreInfo> GetUniStoreInfo(const std::string &path);
+12 -12
View File
@@ -54,18 +54,6 @@ enum RequestType {
PROMPT_ERROR = 3 // Error message prompt. Unused right now.
};
class Queue {
public:
Queue(nlohmann::json object, const C2D_Image &img, const std::string &name, const std::string &uName, const std::string &eName, const std::string &lUpdated) :
obj(object), icn(img), name(name), unistoreName(uName), entryName(eName), lastUpdated(lUpdated) { };
QueueStatus status = QueueStatus::None;
nlohmann::json obj;
C2D_Image icn;
int total, current;
std::string name = "", unistoreName = "", entryName = "", lastUpdated = "";
};
/* Of course also a namespace to that part, so we can do that in a Thread. */
namespace QueueSystem {
extern int RequestNeeded, RequestAnswer;
@@ -79,4 +67,16 @@ namespace QueueSystem {
void Resume();
};
class Queue {
public:
Queue(nlohmann::json object, const C2D_Image &img, const std::string &name, const std::string &uName, const std::string &eName, const std::string &lUpdated) :
obj(object), icn(img), total(object.size()), current(QueueSystem::LastElement), name(name), unistoreName(uName), entryName(eName), lastUpdated(lUpdated) { };
QueueStatus status = QueueStatus::None;
nlohmann::json obj;
C2D_Image icn;
int total, current;
std::string name = "", unistoreName = "", entryName = "", lastUpdated = "";
};
#endif
+1 -1
View File
@@ -37,7 +37,7 @@ namespace StringUtils {
std::string formatBytes(int bytes);
std::string GetMarkString(int marks);
std::vector<std::string> GetMarks(int marks);
std::string format(const std::string &fmt_str, ...);
std::string format(const char *fmt_str, ...);
};
#endif