NANDContentLoader: Specify constructors as explicit where applicable

Prevents implicit conversion.
This commit is contained in:
Lioncash 2016-09-14 19:44:41 -04:00
parent 89c65be703
commit 3196bf5392

View File

@ -35,7 +35,7 @@ public:
class CNANDContentDataFile final : public CNANDContentData class CNANDContentDataFile final : public CNANDContentData
{ {
public: public:
CNANDContentDataFile(const std::string& filename) : m_filename(filename){}; explicit CNANDContentDataFile(const std::string& filename) : m_filename(filename){};
void Open() override; void Open() override;
std::vector<u8> Get() override; std::vector<u8> Get() override;
@ -51,7 +51,7 @@ private:
class CNANDContentDataBuffer final : public CNANDContentData class CNANDContentDataBuffer final : public CNANDContentData
{ {
public: public:
CNANDContentDataBuffer(const std::vector<u8>& buffer) : m_buffer(buffer){}; explicit CNANDContentDataBuffer(const std::vector<u8>& buffer) : m_buffer(buffer){};
std::vector<u8> Get() override { return m_buffer; }; std::vector<u8> Get() override { return m_buffer; };
bool GetRange(u32 start, u32 size, u8* buffer) override; bool GetRange(u32 start, u32 size, u8* buffer) override;
@ -76,7 +76,7 @@ struct SNANDContent
class CNANDContentLoader final class CNANDContentLoader final
{ {
public: public:
CNANDContentLoader(const std::string& content_name); explicit CNANDContentLoader(const std::string& content_name);
virtual ~CNANDContentLoader(); virtual ~CNANDContentLoader();
bool IsValid() const { return m_Valid; } bool IsValid() const { return m_Valid; }