aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/file.cpp')
-rw-r--r--common/file.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp
index e84e337d2f..94b3e48930 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -553,5 +553,12 @@ uint32 DumpFile::write(const void *ptr, uint32 len) {
return (uint32)fwrite(ptr, 1, len, (FILE *)_handle);
}
+void DumpFile::flush() {
+ assert(_handle);
+ // TODO: Should check the return value of fflush, and if it is non-zero,
+ // check errno and set an error flag.
+ fflush((FILE *)_handle);
+}
+
} // End of namespace Common