Initialize the file pointer when constructing a buffer writer

This commit is contained in:
Mishmish Dev 2026-10-04 03:57:42 +01:00
parent 21c5445e8c
commit 34c7ca0cf6
No known key found for this signature in database
GPG Key ID: 442E115AB1A529B7

View File

@ -1091,7 +1091,7 @@ class writer {
public:
inline writer(FILE* f) : buf_(nullptr), file_(f) {}
inline writer(detail::buffer<char>& buf) : buf_(&buf) {}
inline writer(detail::buffer<char>& buf) : buf_(&buf), file_(nullptr) {}
/// Formats `args` according to specifications in `fmt` and writes the
/// output to the file.