diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 659cbaf3..4d7fd4b1 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -22,7 +22,7 @@ template class formatbuf : public std::basic_streambuf { buffer& buffer_; public: - formatbuf(buffer& buffer) : buffer_(buffer) {} + formatbuf(buffer& buf) : buffer_(buf) {} protected: // The put-area is actually always empty. This makes the implementation @@ -72,26 +72,26 @@ template class is_streamable { // Write the content of buf to os. template void write(std::basic_ostream& os, buffer& buf) { - const Char* data = buf.data(); + const Char* buf_data = buf.data(); typedef std::make_unsigned::type UnsignedStreamSize; UnsignedStreamSize size = buf.size(); UnsignedStreamSize max_size = internal::to_unsigned((std::numeric_limits::max)()); do { UnsignedStreamSize n = size <= max_size ? size : max_size; - os.write(data, static_cast(n)); - data += n; + os.write(buf_data, static_cast(n)); + buf_data += n; size -= n; } while (size != 0); } template -void format_value(buffer& buffer, const T& value) { - internal::formatbuf format_buf(buffer); +void format_value(buffer& buf, const T& value) { + internal::formatbuf format_buf(buf); std::basic_ostream output(&format_buf); output.exceptions(std::ios_base::failbit | std::ios_base::badbit); output << value; - buffer.resize(buffer.size()); + buf.resize(buf.size()); } // Formats an object of type T that has an overloaded ostream operator<<.