summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcommon/hexdump.h4
-rw-r--r--indra/llcommon/llleaplistener.cpp2
-rw-r--r--indra/llcommon/llleaplistener.h2
-rw-r--r--indra/llcommon/lua_function.cpp4
-rw-r--r--indra/llcommon/lua_function.h8
-rw-r--r--indra/llcommon/tests/llrand_test.cpp2
-rw-r--r--indra/newview/llluamanager.cpp2
-rw-r--r--indra/newview/tests/llluamanager_test.cpp2
-rw-r--r--indra/test/namedtempfile.h24
9 files changed, 25 insertions, 25 deletions
diff --git a/indra/llcommon/hexdump.h b/indra/llcommon/hexdump.h
index ab5ba2b16d..4b734426a3 100755
--- a/indra/llcommon/hexdump.h
+++ b/indra/llcommon/hexdump.h
@@ -25,7 +25,7 @@ namespace LL
class hexdump
{
public:
- hexdump(const std::string_view& data):
+ hexdump(std::string_view data):
hexdump(data.data(), data.length())
{}
@@ -66,7 +66,7 @@ private:
class hexmix
{
public:
- hexmix(const std::string_view& data):
+ hexmix(std::string_view data):
mData(data)
{}
diff --git a/indra/llcommon/llleaplistener.cpp b/indra/llcommon/llleaplistener.cpp
index b81ee66ba9..9742c9e9de 100644
--- a/indra/llcommon/llleaplistener.cpp
+++ b/indra/llcommon/llleaplistener.cpp
@@ -54,7 +54,7 @@
return features;
}
-LLLeapListener::LLLeapListener(const std::string_view& caller, const Callback& callback):
+LLLeapListener::LLLeapListener(std::string_view caller, const Callback& callback):
// Each LEAP plugin has an instance of this listener. Make the command
// pump name difficult for other such plugins to guess.
LLEventAPI(LLUUID::generateNewID().asString(),
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; }
diff --git a/indra/llcommon/lua_function.cpp b/indra/llcommon/lua_function.cpp
index eefb1e62cf..380e650360 100644
--- a/indra/llcommon/lua_function.cpp
+++ b/indra/llcommon/lua_function.cpp
@@ -999,8 +999,8 @@ LuaPopper::~LuaPopper()
/*****************************************************************************
* LuaFunction class
*****************************************************************************/
-LuaFunction::LuaFunction(const std::string_view& name, lua_CFunction function,
- const std::string_view& helptext)
+LuaFunction::LuaFunction(std::string_view name, lua_CFunction function,
+ std::string_view helptext)
{
const auto& [registry, lookup] = getState();
registry.emplace(name, Registry::mapped_type{ function, helptext });
diff --git a/indra/llcommon/lua_function.h b/indra/llcommon/lua_function.h
index 967d8eaba1..12e74b5d04 100644
--- a/indra/llcommon/lua_function.h
+++ b/indra/llcommon/lua_function.h
@@ -351,7 +351,7 @@ auto lua_setfieldv(lua_State* L, int index, const char* k, const T& value)
// return to C++, from table at index, the value of field k (without metamethods)
template <typename T>
-auto lua_rawgetfield(lua_State* L, int index, const std::string_view& k)
+auto lua_rawgetfield(lua_State* L, int index, std::string_view k)
{
index = lua_absindex(L, index);
lua_checkdelta(L);
@@ -364,7 +364,7 @@ auto lua_rawgetfield(lua_State* L, int index, const std::string_view& k)
// set in table at index, as field k, the specified C++ value (without metamethods)
template <typename T>
-void lua_rawsetfield(lua_State* L, int index, const std::string_view& k, const T& value)
+void lua_rawsetfield(lua_State* L, int index, std::string_view k, const T& value)
{
index = lua_absindex(L, index);
lua_checkdelta(L);
@@ -389,8 +389,8 @@ void lua_rawsetfield(lua_State* L, int index, const std::string_view& k, const T
class LuaFunction
{
public:
- LuaFunction(const std::string_view& name, lua_CFunction function,
- const std::string_view& helptext);
+ LuaFunction(std::string_view name, lua_CFunction function,
+ std::string_view helptext);
static void init(lua_State* L);
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, ')') };
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.
diff --git a/indra/newview/tests/llluamanager_test.cpp b/indra/newview/tests/llluamanager_test.cpp
index 8d1333815b..f0a1b32eed 100644
--- a/indra/newview/tests/llluamanager_test.cpp
+++ b/indra/newview/tests/llluamanager_test.cpp
@@ -123,7 +123,7 @@ namespace tut
}
}
- void from_lua(const std::string& desc, const std::string_view& construct, const LLSD& expect)
+ void from_lua(const std::string& desc, std::string_view construct, const LLSD& expect)
{
LLSD fromlua;
LLStreamListener pump("testpump",
diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index 8027f95728..96b19523ab 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -32,18 +32,18 @@ class NamedTempFile: public boost::noncopyable
{
LOG_CLASS(NamedTempFile);
public:
- NamedTempFile(const std::string_view& pfx,
- const std::string_view& content,
- const std::string_view& sfx=std::string_view(""))
+ NamedTempFile(std::string_view pfx,
+ std::string_view content,
+ std::string_view sfx=std::string_view(""))
{
createFile(pfx, [&content](std::ostream& out){ out << content; }, sfx);
}
// Disambiguate when passing string literal -- unclear why a string
// literal should be ambiguous wrt std::string_view and Streamer
- NamedTempFile(const std::string_view& pfx,
+ NamedTempFile(std::string_view pfx,
const char* content,
- const std::string_view& sfx=std::string_view(""))
+ std::string_view sfx=std::string_view(""))
{
createFile(pfx, [&content](std::ostream& out){ out << content; }, sfx);
}
@@ -53,9 +53,9 @@ public:
// (boost::phoenix::placeholders::arg1 << "the value is " << 17 << '\n')
typedef std::function<void(std::ostream&)> Streamer;
- NamedTempFile(const std::string_view& pfx,
+ NamedTempFile(std::string_view pfx,
const Streamer& func,
- const std::string_view& sfx=std::string_view(""))
+ std::string_view sfx=std::string_view(""))
{
createFile(pfx, func, sfx);
}
@@ -94,8 +94,8 @@ public:
return out;
}
- static boost::filesystem::path temp_path(const std::string_view& pfx="",
- const std::string_view& sfx="")
+ static boost::filesystem::path temp_path(std::string_view pfx="",
+ std::string_view sfx="")
{
// This variable is set by GitHub actions and is the recommended place
// to put temp files belonging to an actions job.
@@ -114,9 +114,9 @@ public:
}
protected:
- void createFile(const std::string_view& pfx,
+ void createFile(std::string_view pfx,
const Streamer& func,
- const std::string_view& sfx)
+ std::string_view sfx)
{
// Create file in a temporary place.
mPath = temp_path(pfx, sfx);
@@ -137,7 +137,7 @@ class NamedExtTempFile: public NamedTempFile
{
LOG_CLASS(NamedExtTempFile);
public:
- NamedExtTempFile(const std::string& ext, const std::string_view& content):
+ NamedExtTempFile(const std::string& ext, std::string_view content):
NamedTempFile(remove_dot(ext), content, ensure_dot(ext))
{}