Skip to content

Commit

Permalink
Merge pull request google#224 from jray272/run-windows-script
Browse files Browse the repository at this point in the history
Run src/windows/preprocess.sh to pick up latest logging.h.in changes
  • Loading branch information
shinh committed Aug 9, 2017
2 parents a502321 + 4ab7468 commit e3e0afc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Fumitoshi Ukai <ukai@google.com>
Guillaume Dumont <dumont.guillaume@gmail.com>
Håkan L. S. Younes <hyounes@google.com>
Ivan Penkov <ivanpe@google.com>
Jim Ray <jimray@google.com>
Michael Tanner <michael@tannertaxpro.com>
MiniLight <MiniLightAR@Gmail.com>
Peter Collingbourne <pcc@google.com>
Expand Down
7 changes: 7 additions & 0 deletions src/windows/glog/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,12 @@ class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf {
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;
Expand Down Expand Up @@ -1179,6 +1185,7 @@ class GOOGLE_GLOG_DLL_DECL LogMessage {
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&);
Expand Down

0 comments on commit e3e0afc

Please sign in to comment.