From: robertc <> Date: Wed, 16 Jul 2003 05:12:02 +0000 (+0000) Subject: Summary: MSVC compatability fixes from Guido. X-Git-Tag: SQUID_3_0_PRE1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aeabf9515e94cea81d8f1c7941344d528833a76;p=thirdparty%2Fsquid.git Summary: MSVC compatability fixes from Guido. Keywords: Remove pointer-to-type constructors. More consistency between struct/class defn's and use. --- diff --git a/src/ACLIP.cc b/src/ACLIP.cc index 2778a13fd2..e5b7472e5f 100644 --- a/src/ACLIP.cc +++ b/src/ACLIP.cc @@ -368,7 +368,7 @@ ACLIP::~ACLIP() wordlist * ACLIP::dump() const { - wordlist *w (NULL); + wordlist *w = NULL; data->walk (DumpIpListWalkee, &w); return w; } diff --git a/src/ESICustomParser.cc b/src/ESICustomParser.cc index 6300c45230..8f0f2bda03 100644 --- a/src/ESICustomParser.cc +++ b/src/ESICustomParser.cc @@ -1,6 +1,6 @@ /* - * $Id: ESICustomParser.cc,v 1.2 2003/07/14 14:15:56 robertc Exp $ + * $Id: ESICustomParser.cc,v 1.3 2003/07/15 23:12:02 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -79,7 +79,7 @@ char const * ESICustomParser::findTag(char const *buffer, size_t bufferLength) { size_t myOffset (0); - void *resulttype (NULL); + void *resulttype = NULL; while (myOffset < bufferLength && (resulttype =GetTrie()->findPrefix (buffer + myOffset, bufferLength - myOffset)) == NULL) @@ -109,7 +109,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool size_t openESITags (0); char const *currentPos = content.buf(); size_t remainingCount = content.size(); - char const *tag (NULL); + char const *tag = NULL; while ((tag = findTag(currentPos, remainingCount))) { if (tag - currentPos) diff --git a/src/ESIExcept.h b/src/ESIExcept.h index 4fd7fdc157..b96d3e11c5 100644 --- a/src/ESIExcept.h +++ b/src/ESIExcept.h @@ -1,5 +1,5 @@ /* - * $Id: ESIExcept.h,v 1.1 2003/03/10 04:56:35 robertc Exp $ + * $Id: ESIExcept.h,v 1.2 2003/07/15 23:12:02 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -42,8 +42,10 @@ /* esiExcept */ -struct esiExcept : public esiSequence +class esiExcept : public esiSequence { + +public: // void *operator new (size_t byteCount); // void operator delete (void *address); void deleteSelf() const; diff --git a/src/SwapDir.h b/src/SwapDir.h index 7c78da6110..b5e67018f7 100644 --- a/src/SwapDir.h +++ b/src/SwapDir.h @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.h,v 1.4 2003/03/06 06:21:37 robertc Exp $ + * $Id: SwapDir.h,v 1.5 2003/07/15 23:12:02 robertc Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -42,7 +42,7 @@ typedef void STFSSTARTUP(void); typedef void STFSSHUTDOWN(void); typedef SwapDir *STFSNEW(void); -struct SwapDir +class SwapDir { public: diff --git a/src/fs/ufs/store_io_ufs.cc b/src/fs/ufs/store_io_ufs.cc index d450041158..9923d22d1e 100644 --- a/src/fs/ufs/store_io_ufs.cc +++ b/src/fs/ufs/store_io_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_io_ufs.cc,v 1.18 2003/03/04 01:40:57 robertc Exp $ + * $Id: store_io_ufs.cc,v 1.19 2003/07/15 23:12:02 robertc Exp $ * * DEBUG: section 79 Storage Manager UFS Interface * AUTHOR: Duane Wessels @@ -432,9 +432,9 @@ UFSStoreState::~UFSStoreState() delete qr; } - struct _queued_write *qw; + _queued_write *qw; - while ((qw = (struct _queued_write *)linklistShift(&pending_writes))) { + while ((qw = (_queued_write *)linklistShift(&pending_writes))) { if (qw->free_func) qw->free_func(const_cast(qw->buf)); delete qw; @@ -532,7 +532,7 @@ UFSStoreState::queueWrite(char const *buf, size_t size, off_t offset, FREE * fre { debug(79, 3) ("UFSStoreState::queueWrite: queuing write\n"); - struct _queued_write *q; + _queued_write *q; q = new _queued_write; q->buf = buf; q->size = size;