From 0734b418daebee17fb6620f9fe7514f06b630272 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Sat, 9 Sep 2000 06:40:49 +0000 Subject: [PATCH] adding a |#if|d out hunk of code to remind me of something later git-svn-id: svn://10.0.0.236/trunk@78601 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/string/src/nsSharedBufferList.cpp | 27 +++++++++++++++++++ mozilla/xpcom/ds/nsSharedBufferList.cpp | 27 +++++++++++++++++++ .../xpcom/string/src/nsSharedBufferList.cpp | 27 +++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/mozilla/string/src/nsSharedBufferList.cpp b/mozilla/string/src/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/string/src/nsSharedBufferList.cpp +++ b/mozilla/string/src/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif diff --git a/mozilla/xpcom/ds/nsSharedBufferList.cpp b/mozilla/xpcom/ds/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/xpcom/ds/nsSharedBufferList.cpp +++ b/mozilla/xpcom/ds/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif diff --git a/mozilla/xpcom/string/src/nsSharedBufferList.cpp b/mozilla/xpcom/string/src/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/xpcom/string/src/nsSharedBufferList.cpp +++ b/mozilla/xpcom/string/src/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif