From 2b3879c748adb8d48606339cecaf81a12c19f697 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 17 May 2021 17:39:17 +0200 Subject: Use implicit conversion from OStringBuffer to std::string_view ...instead of going via raw `char const *`. (This changes the code's semantics if buffer can contain embedded NULs, but it is unlikely that the original code using getStr() was even meant to stop comparison at the first embedded NUL.) Change-Id: I00a0a08b3ba8c318e3b898548ef185efa3f93ef2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115713 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- codemaker/source/codemaker/global.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index e302d7c7742c..1b2b11db0f7e 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -119,7 +119,7 @@ OString createFileNameFromType( const OString& destination, if( nIndex == -1 ) break; - if (buffer.isEmpty() || std::string_view(".") == buffer.getStr()) + if (buffer.isEmpty() || std::string_view(".") == buffer) { buffer.append(token); continue; -- cgit