Skip to content

Commit f8febd1

Browse files
committed
Use fwrite instead of fprintf for faster and simpler writing.
1 parent 5cb36a1 commit f8febd1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

includes/sjson/writer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ namespace sjson
6868

6969
virtual void write(const void* buffer, size_t buffer_size) override
7070
{
71-
(void)buffer_size;
72-
fprintf(m_file, "%s", reinterpret_cast<const char*>(buffer));
71+
fwrite(buffer, sizeof(char), buffer_size, m_file);
7372
}
7473

7574
private:

0 commit comments

Comments
 (0)