mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Wrapped fopen/close/read/write functions inside a simple "IOFile" class. Reading, writing, and error checking became simpler in most cases. It should be near impossible to forget to close a file now that the destructor takes care of it. (I hope this fixes Issue 3635) I have tested the functionality of most things, but it is possible I broke something. :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7328 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -21,10 +21,10 @@
|
||||
#include "Log.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Thread.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX_MESSAGES 8000
|
||||
#define MAX_MSGLEN 1024
|
||||
@ -40,8 +40,7 @@ public:
|
||||
|
||||
class FileLogListener : public LogListener {
|
||||
public:
|
||||
FileLogListener(std::string filename);
|
||||
~FileLogListener();
|
||||
FileLogListener(const char *filename);
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS, const char *msg);
|
||||
|
||||
@ -60,8 +59,7 @@ public:
|
||||
const char *getName() const { return "file"; }
|
||||
|
||||
private:
|
||||
std::string m_filename;
|
||||
FILE *m_logfile;
|
||||
std::ofstream m_logfile;
|
||||
bool m_enable;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user