From 8b513dcebbcbf55bf903ba0c1249561f03d92e79 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 12 Sep 2025 09:10:58 +0200 Subject: [PATCH] rustmaker: Make loplugin:simplifyconstruct happy Fix this clang plugin error seen in an --enable-rust-uno build: .../libreoffice/codemaker/source/rustmaker/cpp_include_manager.cxx:138:17: error: simplify construction, just use 'Foo a(...);' [loplugin:simplifyconstruct] 138 | std::string targetTypeStr = std::string(targetType); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Change-Id: Idf5e672e65e4029686a6c2cd4ca5b9dde7de3e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190849 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- codemaker/source/rustmaker/cpp_include_manager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemaker/source/rustmaker/cpp_include_manager.cxx b/codemaker/source/rustmaker/cpp_include_manager.cxx index bbf4b98bb777..e2a63d0f7a13 100644 --- a/codemaker/source/rustmaker/cpp_include_manager.cxx +++ b/codemaker/source/rustmaker/cpp_include_manager.cxx @@ -135,7 +135,7 @@ OString CppIncludeManager::calculateRelativeIncludePath(const CppFile& file, fs::path currentDir = currentFilePath.parent_path(); // Convert target type name to path (dots to slashes) - std::string targetTypeStr = std::string(targetType); + std::string targetTypeStr(targetType); std::replace(targetTypeStr.begin(), targetTypeStr.end(), '.', '/'); // Find the base directory (cpp)