summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/plugins/sunmajor/pluginlib/util.cxx')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index f7d786007544..b596e18cf480 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1023,10 +1023,10 @@ Reference<VendorBase> createInstance(createInstance_func pFunc,
return aBase;
}
-inline OUString getDirFromFile(const OUString& usFilePath)
+inline OUString getDirFromFile(std::u16string_view usFilePath)
{
- sal_Int32 index = usFilePath.lastIndexOf('/');
- return usFilePath.copy(0, index);
+ size_t index = usFilePath.rfind('/');
+ return OUString(usFilePath.substr(0, index));
}
void addJavaInfosFromPath(