summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llrand_test.cpp
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/tests/llrand_test.cpp
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/tests/llrand_test.cpp')
-rw-r--r--indra/llcommon/tests/llrand_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llcommon/tests/llrand_test.cpp b/indra/llcommon/tests/llrand_test.cpp
index a0dd4ef576..85dd53ce96 100644
--- a/indra/llcommon/tests/llrand_test.cpp
+++ b/indra/llcommon/tests/llrand_test.cpp
@@ -38,7 +38,7 @@
// testing extent < 0, negate the return value and the extent before passing
// into ensure_in_range().
template <typename NUMBER>
-void ensure_in_range(const std::string_view& name,
+void ensure_in_range(std::string_view name,
NUMBER value, NUMBER low, NUMBER high)
{
auto failmsg{ stringize(name, " >= ", low, " (", value, ')') };