summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadsafequeue.h
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-09-10 15:53:59 -0400
committerGitHub <noreply@github.com>2025-09-10 15:53:59 -0400
commit5b97823db6f7cec6569ef893499cf48f4a889e67 (patch)
tree79f368f096ba2c72a98627671c713a0a8abf332f /indra/llcommon/llthreadsafequeue.h
parent175400230869963df7a3f126122ace14456c56cb (diff)
parentdd1113ba2b62b24378e5b8ecfee0093474527c5a (diff)
Merge pull request #4636 from secondlife/project/mac_universal
Apple Silicon Support
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.h')
-rw-r--r--indra/llcommon/llthreadsafequeue.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llcommon/llthreadsafequeue.h b/indra/llcommon/llthreadsafequeue.h
index 034e3f7897..1a1d06a6fd 100644
--- a/indra/llcommon/llthreadsafequeue.h
+++ b/indra/llcommon/llthreadsafequeue.h
@@ -452,7 +452,9 @@ ElementT LLThreadSafeQueue<ElementT, QueueT>::pop(void)
// so we can finish draining the queue.
pop_result popped = pop_(lock1, value);
if (popped == POPPED)
- return std::move(value);
+ // don't use std::move when returning local value because
+ // it prevents the compiler from optimizing with copy elision
+ return value;
// Once the queue is DONE, there will never be any more coming.
if (popped == DONE)