Format code and add missing imports

This commit is contained in:
Maschell 2022-04-27 19:27:07 +02:00
parent 9e5e7ddc23
commit 11e89b04ce
7 changed files with 11 additions and 14 deletions

View File

@ -1,10 +1,10 @@
#pragma once
#include "utils/logger.h"
#include "utils/utils.h"
#include <coreinit/mcp.h>
#include <mutex>
#include <string>
#include <wuhb_utils/utils.h>
#include "utils/utils.h"
class FileInfos {
public:

View File

@ -19,7 +19,7 @@ public:
virtual bool isReady();
virtual uint32_t getHandle(){
virtual uint32_t getHandle() {
return reinterpret_cast<uint32_t>(this);
}

View File

@ -4,7 +4,7 @@
#include <coreinit/cache.h>
#include <wuhb_utils/utils.h>
FileReaderWUHB::FileReaderWUHB(const std::shared_ptr<FileInfos>& info, const std::string &relativeFilepath, bool autoUnmount) {
FileReaderWUHB::FileReaderWUHB(const std::shared_ptr<FileInfos> &info, const std::string &relativeFilepath, bool autoUnmount) {
if (!info) {
DEBUG_FUNCTION_LINE_ERR("Info was NULL");
return;

View File

@ -11,7 +11,7 @@ class FileReaderWUHB : public FileReader {
bool autoUnmount = false;
public:
explicit FileReaderWUHB(const std::shared_ptr<FileInfos>& info, const std::string &relativeFilepath, bool autoUnmount);
explicit FileReaderWUHB(const std::shared_ptr<FileInfos> &info, const std::string &relativeFilepath, bool autoUnmount);
~FileReaderWUHB() override;
int64_t read(uint8_t *buffer, uint32_t size) override;
bool isReady() override;

View File

@ -47,7 +47,6 @@ ACPMetaXml gLaunchXML __attribute__((section(".data")));
MCPTitleListType current_launched_title_info __attribute__((section(".data")));
BOOL gHomebrewLaunched __attribute__((section(".data")));
std::mutex fileInfosMutex;
std::forward_list<std::shared_ptr<FileInfos>> fileInfos;
@ -238,12 +237,9 @@ void readCustomTitlesFromSD() {
}
auto repl = "fs:/vol/external01/";
auto input = dirList.GetFilepath(i);
const char * relativeFilepath;
const char *relativeFilepath;
if (std::string_view(input).starts_with(repl)) {
relativeFilepath = &input[strlen(repl)];

View File

@ -8,11 +8,11 @@
extern "C" {
#endif
#define LOG_APP_TYPE "P"
#define LOG_APP_NAME "homebrew_on_menu"
#define LOG_APP_TYPE "P"
#define LOG_APP_NAME "homebrew_on_menu"
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
#define LOG(LOG_FUNC, FMT, ARGS...) LOG_EX(LOG_FUNC, "", "", FMT, ##ARGS)

View File

@ -3,6 +3,8 @@
#include <cstdint>
#include <forward_list>
#include <malloc.h>
#include <memory>
#include <mutex>
uint32_t hash_string(const char *);
@ -29,4 +31,3 @@ bool remove_locked_first_if(std::mutex &mutex, std::forward_list<T, Allocator> &
}
return false;
}