desktop/source/migration/migration_impl.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 09fc31370252a09dd8affda0b0c743133e023244 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Sep 22 23:26:34 2021 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Sep 23 08:49:35 2021 +0200 Extend loplugin:stringviewparam to starts/endsWith: desktop Change-Id: I42fa4d25eca6b2c5d14212eca3a6ebc7146cce5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122500 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index a3e21a4a1f24..cf2d201d22e6 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -19,9 +19,11 @@ #pragma once #include <memory> +#include <string_view> #include <unordered_map> #include <vector> +#include <o3tl/string_view.hxx> #include <sal/types.h> #include <rtl/ustring.hxx> @@ -64,9 +66,9 @@ typedef std::vector< migration_step > migrations_v; typedef std::unique_ptr< migrations_v > migrations_vr; typedef std::vector< supported_migration > migrations_available; -inline bool areBothOpenFrom(std::u16string_view cmd1, OUString const & cmd2) +inline bool areBothOpenFrom(std::u16string_view cmd1, std::u16string_view cmd2) { - return cmd1 == u".uno:Open" && cmd2.startsWith(".uno:OpenFrom"); + return cmd1 == u".uno:Open" && o3tl::starts_with(cmd2, u".uno:OpenFrom"); } /**