logging/WriterFrontend: No need for explicit CleanupWriteBuffer()

Any pending records will be cleaned in the destructor of WriterFrontend
and WriteBuffer, no need to do this explicitly.
This commit is contained in:
Arne Welzel 2024-08-30 10:45:04 +02:00
parent a9290cc031
commit f0ab10a46c
2 changed files with 1 additions and 14 deletions

View file

@ -61,11 +61,6 @@ public:
*/
bool Full() const { return records.size() >= buffer_size; }
/**
* Clear the records buffer.
*/
void Clear() { records.clear(); }
private:
size_t buffer_size;
std::vector<LogRecord> records;
@ -269,9 +264,6 @@ protected:
// Buffer for bulk writes.
static const int WRITER_BUFFER_SIZE = 1000;
detail::WriteBuffer write_buffer; // Buffer of size WRITER_BUFFER_SIZE.
private:
void CleanupWriteBuffer();
};
} // namespace zeek::logging