Changed "auto_flush" to "force_flush" to better represent the meaning

This commit is contained in:
gabi
2015-01-07 12:44:02 +02:00
parent 06ef01f867
commit 7635455c8d
4 changed files with 22 additions and 22 deletions

View File

@@ -48,9 +48,9 @@ public:
const int open_tries = 5;
const int open_interval = 10;
explicit file_helper(bool auto_flush):
explicit file_helper(bool force_flush):
_fd(nullptr),
_auto_flush(auto_flush)
_force_flush(force_flush)
{}
file_helper(const file_helper&) = delete;
@@ -104,7 +104,7 @@ public:
if(std::fwrite(data, 1, size, _fd) != size)
throw spdlog_ex("Failed writing to file " + _filename);
if(_auto_flush)
if(_force_flush)
std::fflush(_fd);
}
@@ -131,7 +131,7 @@ public:
private:
FILE* _fd;
std::string _filename;
bool _auto_flush;
bool _force_flush;
};