mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
[FS] Use std::string over C strings for archive names
This commit is contained in:
parent
e1ac986009
commit
3d1aafa7dd
4 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include "helpers.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace ArchiveID {
|
|||
SDMCWriteOnly = 0xA
|
||||
};
|
||||
|
||||
static const char* toString(u32 id) {
|
||||
static std::string toString(u32 id) {
|
||||
switch (id) {
|
||||
case SelfNCCH: return "SelfNCCH";
|
||||
case SaveData: return "SaveData";
|
||||
|
@ -72,7 +73,7 @@ protected:
|
|||
Memory& mem;
|
||||
|
||||
public:
|
||||
virtual const char* name() = 0;
|
||||
virtual std::string name() = 0;
|
||||
virtual u64 getFreeBytes() = 0;
|
||||
virtual bool openFile(const FSPath& path) = 0;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
SelfNCCHArchive(Memory& mem) : ArchiveBase(mem) {}
|
||||
|
||||
u64 getFreeBytes() override { return 0; }
|
||||
const char* name() override { return "SelfNCCH"; }
|
||||
std::string name() override { return "SelfNCCH"; }
|
||||
|
||||
bool openFile(const FSPath& path) override;
|
||||
ArchiveBase* openArchive(const FSPath& path) override;
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
SaveDataArchive(Memory& mem) : ArchiveBase(mem) {}
|
||||
|
||||
u64 getFreeBytes() override { return 0; }
|
||||
const char* name() override { return "SaveData"; }
|
||||
std::string name() override { return "SaveData"; }
|
||||
|
||||
bool openFile(const FSPath& path) override;
|
||||
ArchiveBase* openArchive(const FSPath& path) override;
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
SDMCArchive(Memory& mem) : ArchiveBase(mem) {}
|
||||
|
||||
u64 getFreeBytes() override { return 0; }
|
||||
const char* name() override { return "SDMC"; }
|
||||
std::string name() override { return "SDMC"; }
|
||||
|
||||
bool openFile(const FSPath& path) override;
|
||||
ArchiveBase* openArchive(const FSPath& path) override;
|
||||
|
|
Loading…
Add table
Reference in a new issue