summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Ray <jimray@google.com>2017-07-31 05:25:36 (GMT)
committerJim Ray <jimray@google.com>2017-08-06 07:13:30 (GMT)
commit8ed1668cdb57a9390c2134f3bf9b87e28737064f (patch)
tree283ea1b554d8a1cb83e94a2b1a72a7237cb2db51 /src
parentbb485da39a571bcbecaad548c46afe7c89a08e7d (diff)
downloadglog-8ed1668cdb57a9390c2134f3bf9b87e28737064f.zip
glog-8ed1668cdb57a9390c2134f3bf9b87e28737064f.tar.gz
glog-8ed1668cdb57a9390c2134f3bf9b87e28737064f.tar.bz2
Update Windows logging.h based on 2df0ca34aa
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/windows/glog/logging.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h
index f521a2b..e72c088 100755
--- a/src/windows/glog/logging.h
+++ b/src/windows/glog/logging.h
@@ -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;
@@ -1179,6 +1185,7 @@ public:
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&);