Made JsonWriterFile flush on destruct

This commit is contained in:
Jordan Cristiano 2015-06-26 01:10:46 -04:00
parent 121dd61e9a
commit 45da2a9b2d
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,11 @@ namespace base
{ {
} }
JsonWriterFile::~JsonWriterFile()
{
Flush();
}
FILE* JsonWriterFile::GetFp() const FILE* JsonWriterFile::GetFp() const
{ {
return m_fp; return m_fp;

View File

@ -13,6 +13,7 @@ namespace base
{ {
public: public:
JsonWriterFile(FILE* fp, char* buffer, std::size_t length); JsonWriterFile(FILE* fp, char* buffer, std::size_t length);
~JsonWriterFile();
FILE* GetFp() const; FILE* GetFp() const;
void Flush(); void Flush();