summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadsafequeue.h
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-10-08 17:06:20 +0300
committerGitHub <noreply@github.com>2024-10-08 17:06:20 +0300
commit6ccae2d0ae977965202ecb45de77e46f8d0312b3 (patch)
tree0819595c2a50aa7066b0c75b49d3b6c31f5636b9 /indra/llcommon/llthreadsafequeue.h
parentccc7fffb22b347149bf807b9d92677e5616c5017 (diff)
parent3dca9fc377e855b74a78a5c30464b468dcc82644 (diff)
Merge branch 'develop' into maxim/lua-nearby-avatars
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.h')
-rw-r--r--indra/llcommon/llthreadsafequeue.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llcommon/llthreadsafequeue.h b/indra/llcommon/llthreadsafequeue.h
index 034e3f7897..7a5eb5b33d 100644
--- a/indra/llcommon/llthreadsafequeue.h
+++ b/indra/llcommon/llthreadsafequeue.h
@@ -452,7 +452,10 @@ 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 std::move(value);
+ return value;
// Once the queue is DONE, there will never be any more coming.
if (popped == DONE)