diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-05-17 17:39:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-05-18 08:29:18 +0200 |
commit | 2b3879c748adb8d48606339cecaf81a12c19f697 (patch) | |
tree | d3a6e07e771e353493c5543ceb7f3e7cdd6e851d /codemaker/source | |
parent | 81d6ed89d1e5268c2ea4ff527f3e6087dc1d8ccd (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'codemaker/source')
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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; |