summaryrefslogtreecommitdiff
path: root/indra/llcommon/llleaplistener.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-10 15:25:07 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-10 15:25:07 -0400
commit26efc7e376ef52284a6281f36cf45eb03bc13507 (patch)
tree389564bf0eeac27274cad06aadd2342d1768126f /indra/llcommon/llleaplistener.h
parentb8678d8fa3521f4496ddc569de391633711e46cb (diff)
Pass std::string_view by value, not by const reference.
Consensus seems to be that (a) string_view is, in effect, already a reference, (b) it's small enough to make pass-by-value reasonable and (c) the optimizer can reason about values way better than it can about references.
Diffstat (limited to 'indra/llcommon/llleaplistener.h')
-rw-r--r--indra/llcommon/llleaplistener.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llcommon/llleaplistener.h b/indra/llcommon/llleaplistener.h
index d36d2ff8db..d38a6f4ace 100644
--- a/indra/llcommon/llleaplistener.h
+++ b/indra/llcommon/llleaplistener.h
@@ -28,7 +28,7 @@ public:
* event is received.
*/
using Callback = std::function<bool(const std::string& pump, const LLSD& data)>;
- LLLeapListener(const std::string_view& caller, const Callback& callback);
+ LLLeapListener(std::string_view caller, const Callback& callback);
~LLLeapListener();
LLEventPump& getReplyPump() { return mReplyPump; }