From: serassio <> Date: Tue, 14 Aug 2007 16:09:23 +0000 (+0000) Subject: Fix build error on Visual Studio and gcc 3.3 X-Git-Tag: SQUID_3_0_PRE7~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ca48d399074bd1f1da1207f9027ec9861352c9f;p=thirdparty%2Fsquid.git Fix build error on Visual Studio and gcc 3.3 Patch by Alex Rousskov See http://www.codecomments.com/archive292-2005-2-396222.html --- diff --git a/src/StoreEntryStream.h b/src/StoreEntryStream.h index 8a254351b6..9ffd25dce0 100644 --- a/src/StoreEntryStream.h +++ b/src/StoreEntryStream.h @@ -1,6 +1,6 @@ /* - * $Id: StoreEntryStream.h,v 1.4 2007/08/07 20:02:51 rousskov Exp $ + * $Id: StoreEntryStream.h,v 1.5 2007/08/14 10:09:23 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -116,7 +116,11 @@ class StoreEntryStream : public std::ostream public: /* create a stream for writing text etc into theEntry */ - StoreEntryStream(StoreEntry *entry): theBuffer(entry) { this->init(&theBuffer); } + // See http://www.codecomments.com/archive292-2005-2-396222.html + StoreEntryStream(StoreEntry *entry): std::ostream(0), theBuffer(entry) { + rdbuf(&theBuffer); // set the buffer to now-initialized theBuffer + clear(); //clear badbit set by calling init(0) + } private: StoreEntryStreamBuf theBuffer;