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 <m.weghorn@posteo.de>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user