yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

file_sys: Make a few single-argument constructors explicit

Prevents implicit conversions.
This commit is contained in:
Lioncash 2016-12-07 05:20:35 -05:00
parent 8d529a5cda
commit 5e9f1ec096
8 changed files with 10 additions and 10 deletions

View File

@ -64,7 +64,7 @@ private:
*/ */
class ExtSaveDataArchive : public SaveDataArchive { class ExtSaveDataArchive : public SaveDataArchive {
public: public:
ExtSaveDataArchive(const std::string& mount_point) : SaveDataArchive(mount_point) {} explicit ExtSaveDataArchive(const std::string& mount_point) : SaveDataArchive(mount_point) {}
std::string GetName() const override { std::string GetName() const override {
return "ExtSaveDataArchive: " + mount_point; return "ExtSaveDataArchive: " + mount_point;

View File

@ -17,7 +17,7 @@ namespace FileSys {
/// File system interface to the NCCH archive /// File system interface to the NCCH archive
class ArchiveFactory_NCCH final : public ArchiveFactory { class ArchiveFactory_NCCH final : public ArchiveFactory {
public: public:
ArchiveFactory_NCCH(const std::string& mount_point); explicit ArchiveFactory_NCCH(const std::string& mount_point);
std::string GetName() const override { std::string GetName() const override {
return "NCCH"; return "NCCH";

View File

@ -20,7 +20,7 @@ namespace FileSys {
/// File system interface to the RomFS archive /// File system interface to the RomFS archive
class ArchiveFactory_RomFS final : public ArchiveFactory { class ArchiveFactory_RomFS final : public ArchiveFactory {
public: public:
ArchiveFactory_RomFS(Loader::AppLoader& app_loader); explicit ArchiveFactory_RomFS(Loader::AppLoader& app_loader);
std::string GetName() const override { std::string GetName() const override {
return "RomFS"; return "RomFS";

View File

@ -17,7 +17,7 @@ namespace FileSys {
/// Archive backend for SDMC archive /// Archive backend for SDMC archive
class SDMCArchive : public ArchiveBackend { class SDMCArchive : public ArchiveBackend {
public: public:
SDMCArchive(const std::string& mount_point_) : mount_point(mount_point_) {} explicit SDMCArchive(const std::string& mount_point_) : mount_point(mount_point_) {}
std::string GetName() const override { std::string GetName() const override {
return "SDMCArchive: " + mount_point; return "SDMCArchive: " + mount_point;
@ -43,7 +43,7 @@ protected:
/// File system interface to the SDMC archive /// File system interface to the SDMC archive
class ArchiveFactory_SDMC final : public ArchiveFactory { class ArchiveFactory_SDMC final : public ArchiveFactory {
public: public:
ArchiveFactory_SDMC(const std::string& mount_point); explicit ArchiveFactory_SDMC(const std::string& mount_point);
/** /**
* Initialize the archive. * Initialize the archive.

View File

@ -19,7 +19,7 @@ namespace FileSys {
*/ */
class SDMCWriteOnlyArchive : public SDMCArchive { class SDMCWriteOnlyArchive : public SDMCArchive {
public: public:
SDMCWriteOnlyArchive(const std::string& mount_point) : SDMCArchive(mount_point) {} explicit SDMCWriteOnlyArchive(const std::string& mount_point) : SDMCArchive(mount_point) {}
std::string GetName() const override { std::string GetName() const override {
return "SDMCWriteOnlyArchive: " + mount_point; return "SDMCWriteOnlyArchive: " + mount_point;
@ -34,7 +34,7 @@ public:
/// File system interface to the SDMC write-only archive /// File system interface to the SDMC write-only archive
class ArchiveFactory_SDMCWriteOnly final : public ArchiveFactory { class ArchiveFactory_SDMCWriteOnly final : public ArchiveFactory {
public: public:
ArchiveFactory_SDMCWriteOnly(const std::string& mount_point); explicit ArchiveFactory_SDMCWriteOnly(const std::string& mount_point);
/** /**
* Initialize the archive. * Initialize the archive.

View File

@ -18,7 +18,7 @@ namespace FileSys {
/// File system interface to the SystemSaveData archive /// File system interface to the SystemSaveData archive
class ArchiveFactory_SystemSaveData final : public ArchiveFactory { class ArchiveFactory_SystemSaveData final : public ArchiveFactory {
public: public:
ArchiveFactory_SystemSaveData(const std::string& mount_point); explicit ArchiveFactory_SystemSaveData(const std::string& mount_point);
ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override; ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override;
ResultCode Format(const Path& path, const FileSys::ArchiveFormatInfo& format_info) override; ResultCode Format(const Path& path, const FileSys::ArchiveFormatInfo& format_info) override;

View File

@ -17,7 +17,7 @@ namespace FileSys {
*/ */
class PathParser { class PathParser {
public: public:
PathParser(const Path& path); explicit PathParser(const Path& path);
/** /**
* Checks if the Path is valid. * Checks if the Path is valid.

View File

@ -18,7 +18,7 @@ namespace FileSys {
/// Archive backend for general save data archive type (SaveData and SystemSaveData) /// Archive backend for general save data archive type (SaveData and SystemSaveData)
class SaveDataArchive : public ArchiveBackend { class SaveDataArchive : public ArchiveBackend {
public: public:
SaveDataArchive(const std::string& mount_point_) : mount_point(mount_point_) {} explicit SaveDataArchive(const std::string& mount_point_) : mount_point(mount_point_) {}
std::string GetName() const override { std::string GetName() const override {
return "SaveDataArchive: " + mount_point; return "SaveDataArchive: " + mount_point;