Commit changes to src/windows/glog/logging.h that were missed in
2df0ca34aa. Because a change to src/glog/logging.h.in was made,
src/windows/preprocess.sh needed to be run.
LogStreamBuf(char *buf, int len) {
setp(buf, buf + len - 2);
}
LogStreamBuf(char *buf, int len) {
setp(buf, buf + len - 2);
}
+
+ // Resets the buffer. Useful if we reuse it by means of TLS.
+ void reset() {
+ setp(pbase(), epptr());
+ }
+
// This effectively ignores overflow.
virtual int_type overflow(int_type ch) {
return ch;
// This effectively ignores overflow.
virtual int_type overflow(int_type ch) {
return ch;
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
+ void reset() { streambuf_.reset(); }
private:
LogStream(const LogStream&);
private:
LogStream(const LogStream&);