From c7e03600aa20a3b5777fe2baa8f5fb196dbabf7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 22 Mar 2020 07:46:20 -0400 Subject: [PATCH] Fix constant reallocation of texture fetch command queue because...who..uses a vector..for a fifo... By Rye, thanks! --- indra/newview/lltexturefetch.cpp | 4 ++-- indra/newview/lltexturefetch.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 162e715ae..1093ce8fa 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2348,7 +2348,7 @@ LLTextureFetch::~LLTextureFetch() while (! mCommands.empty()) { TFRequest * req(mCommands.front()); - mCommands.erase(mCommands.begin()); + mCommands.pop_front(); delete req; } @@ -3367,7 +3367,7 @@ LLTextureFetch::TFRequest * LLTextureFetch::cmdDequeue() if (! mCommands.empty()) { ret = mCommands.front(); - mCommands.erase(mCommands.begin()); + mCommands.pop_front(); } unlockQueue(); // -Mfq diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 41b0616e9..58dcadf96 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -177,7 +177,7 @@ private: // is logically tied to LLQueuedThread's list of // QueuedRequest instances and so must be covered by the // same locks. - typedef std::vector command_queue_t; + typedef std::deque command_queue_t; command_queue_t mCommands; // If true, modifies some behaviors that help with QA tasks.