From 7dfde61fc95715fc86742d302e7a7e40c438742e Mon Sep 17 00:00:00 2001 From: rickg Date: Thu, 21 May 1998 20:37:17 +0000 Subject: [PATCH] minor perf improvement to deque --- base/src/nsDeque.cpp | 4 ++-- xpcom/ds/nsDeque.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/src/nsDeque.cpp b/base/src/nsDeque.cpp index bd573d00aab..7641099e2fb 100644 --- a/base/src/nsDeque.cpp +++ b/base/src/nsDeque.cpp @@ -160,8 +160,8 @@ void* nsDeque::PopBack(void) { int offset=mOrigin+mSize; if(offset>=mCapacity) offset-=mCapacity; - result=mData[offset]; - mData[offset]=0; + result=mData[offset-1]; + mData[offset-1]=0; mSize--; if(0==mSize) mOrigin=0; diff --git a/xpcom/ds/nsDeque.cpp b/xpcom/ds/nsDeque.cpp index bd573d00aab..7641099e2fb 100644 --- a/xpcom/ds/nsDeque.cpp +++ b/xpcom/ds/nsDeque.cpp @@ -160,8 +160,8 @@ void* nsDeque::PopBack(void) { int offset=mOrigin+mSize; if(offset>=mCapacity) offset-=mCapacity; - result=mData[offset]; - mData[offset]=0; + result=mData[offset-1]; + mData[offset-1]=0; mSize--; if(0==mSize) mOrigin=0;