diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-10 15:25:07 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-10 15:25:07 -0400 |
commit | 26efc7e376ef52284a6281f36cf45eb03bc13507 (patch) | |
tree | 389564bf0eeac27274cad06aadd2342d1768126f /indra/newview/llluamanager.cpp | |
parent | b8678d8fa3521f4496ddc569de391633711e46cb (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/newview/llluamanager.cpp')
-rw-r--r-- | indra/newview/llluamanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp index 6a725e785f..0bd21516bc 100644 --- a/indra/newview/llluamanager.cpp +++ b/indra/newview/llluamanager.cpp @@ -65,7 +65,7 @@ lua_function(sleep, "sleep(seconds): pause the running coroutine") // This function consumes ALL Lua stack arguments and returns concatenated // message string -std::string lua_print_msg(lua_State* L, const std::string_view& level) +std::string lua_print_msg(lua_State* L, std::string_view level) { // On top of existing Lua arguments, we're going to push tostring() and // duplicate each existing stack entry so we can stringize each one. |