remode stack_oss

This commit is contained in:
gabime
2014-05-08 02:23:07 +03:00
parent b72098101e
commit bafea6a6b2
13 changed files with 94 additions and 279 deletions

View File

@@ -12,10 +12,10 @@ public:
explicit file_flush_helper(const std::size_t flush_every):
_flush_every(flush_every),
_write_counter(0) {};
void write(const bufpair_t& msg, std::ofstream& ofs)
void write(const std::string& msg, std::ofstream& ofs)
{
ofs.write(msg.first, msg.second);
ofs.write(msg.data(), msg.size());
if(++_write_counter == _flush_every)
{
ofs.flush();