diff options
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/inc/idlc.hxx | 2 | ||||
-rw-r--r-- | idlc/source/astscope.cxx | 6 | ||||
-rw-r--r-- | idlc/source/idlccompile.cxx | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/idlc/inc/idlc.hxx b/idlc/inc/idlc.hxx index 8995ead72de4..1be11b1457da 100644 --- a/idlc/inc/idlc.hxx +++ b/idlc/inc/idlc.hxx @@ -147,7 +147,7 @@ void removeIfExists(std::string_view pathname); bool copyFile(const OString* source, const OString& target); // a null source means stdin -bool isFileUrl(const OString& fileName); +bool isFileUrl(std::string_view fileName); OString convertToAbsoluteSystemPath(const OString& fileName); OString convertToFileUrl(const OString& fileName); diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index d4c0f954367c..ca6214129c87 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -20,17 +20,19 @@ #include <sal/config.h> #include <algorithm> +#include <string_view> #include <astscope.hxx> #include <astbasetype.hxx> #include <astinterface.hxx> #include <errorhandler.hxx> +#include <o3tl/string_view.hxx> #include <osl/diagnose.h> -static bool isGlobal(const OString& scopedName) +static bool isGlobal(std::string_view scopedName) { - return scopedName.isEmpty() || scopedName.startsWith(":"); + return scopedName.empty() || o3tl::starts_with(scopedName, ":"); } AstScope::AstScope(NodeType nodeType) diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index 1902d63e0cad..6db9a615d316 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -22,6 +22,7 @@ #include <rtl/ustring.hxx> #include <rtl/strbuf.hxx> #include <o3tl/safeint.hxx> +#include <o3tl/string_view.hxx> #include <osl/process.h> #include <osl/diagnose.h> #include <osl/thread.h> @@ -52,9 +53,9 @@ extern int yydebug; static char tmpFilePattern[512]; -bool isFileUrl(const OString& fileName) +bool isFileUrl(std::string_view fileName) { - return fileName.startsWith("file://"); + return o3tl::starts_with(fileName, "file://"); } OString convertToAbsoluteSystemPath(const OString& fileName) |