summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-04-12 15:33:44 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2016-04-12 15:50:20 +0200
commit226c5546e27a66d1278df402abed0c0ac8279f9f (patch)
treeef3cd3f7082e97fdd289b1be7be9ad6a901e6038 /src/common
parentMerge pull request #1613 from mailwl/anp (diff)
downloadyuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar.gz
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar.bz2
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar.lz
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar.xz
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.tar.zst
yuzu-226c5546e27a66d1278df402abed0c0ac8279f9f.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/file_util.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index a85121aa6..880b8a1e3 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -14,6 +14,10 @@
#include "common/common_types.h"
+#ifdef _MSC_VER
+#include "common/string_util.h"
+#endif
+
// User directory indices for GetUserPath
enum {
D_USER_IDX,
@@ -172,7 +176,7 @@ class IOFile : public NonCopyable
{
public:
IOFile();
- IOFile(std::FILE* file);
+ explicit IOFile(std::FILE* file);
IOFile(const std::string& filename, const char openmode[]);
~IOFile();
@@ -235,10 +239,10 @@ public:
return WriteArray(&object, 1);
}
- bool IsOpen() { return nullptr != m_file; }
+ bool IsOpen() const { return nullptr != m_file; }
// m_good is set to false when a read, write or other function fails
- bool IsGood() { return m_good; }
+ bool IsGood() const { return m_good; }
operator void*() { return m_good ? m_file : nullptr; }
std::FILE* ReleaseHandle();
@@ -258,9 +262,6 @@ public:
std::FILE* m_file;
bool m_good;
-private:
- IOFile(IOFile&);
- IOFile& operator=(IOFile& other);
};
} // namespace