summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-01-12 15:45:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-13 07:36:57 +0100
commit363a3be9bb17bd85fd52c1f22abdf649e7cd0d0b (patch)
tree3223ec3147f3d5f4034b5bc2cc2702302526558c /vcl/source
parent3fff050a343e7fb45c3c562772b22fb5e824352f (diff)
loplugin:stringviewparam (clang-cl)
Change-Id: Ie66996f905fcb68ee413171c8727cb42dcb28dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109178 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/opengl/win/WinDeviceInfo.cxx3
-rw-r--r--vcl/source/opengl/win/context.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/opengl/win/WinDeviceInfo.cxx b/vcl/source/opengl/win/WinDeviceInfo.cxx
index c936aee11fa6..2a44987789cf 100644
--- a/vcl/source/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/source/opengl/win/WinDeviceInfo.cxx
@@ -21,6 +21,7 @@
#include <algorithm>
#include <cstdint>
#include <memory>
+#include <string_view>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
@@ -192,7 +193,7 @@ OUString getCacheFolder()
return url;
}
-void writeToLog(SvStream& rStrm, const char* pKey, const OUString & rVal)
+void writeToLog(SvStream& rStrm, const char* pKey, std::u16string_view rVal)
{
rStrm.WriteCharPtr(pKey);
rStrm.WriteCharPtr(": ");
diff --git a/vcl/source/opengl/win/context.cxx b/vcl/source/opengl/win/context.cxx
index 4d30e9c13a9b..b9348b8520b3 100644
--- a/vcl/source/opengl/win/context.cxx
+++ b/vcl/source/opengl/win/context.cxx
@@ -8,6 +8,7 @@
*/
#include <memory>
+#include <string_view>
#include <thread>
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
@@ -403,7 +404,7 @@ static bool InitMultisample(const PIXELFORMATDESCRIPTOR& pfd, int& rPixelFormat,
namespace
{
-bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader, const OUString& rGeometryShader = "", const OString& rPreamble = "")
+bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader, const OUString& rGeometryShader = "", std::string_view rPreamble = "")
{
GLint nId;
@@ -417,7 +418,7 @@ bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader,
}
else
{
- assert(rPreamble.isEmpty());
+ assert(rPreamble.empty());
nId = OpenGLHelper::LoadShaders(rVertexShader, rFragmentShader, rGeometryShader);
}
if (!nId)