Kaydet (Commit) 0df4ec7d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in VclBuilder::preload

Change-Id: Ifda987ce3e9f24fb9e985a01ed8e39232f61e997
Reviewed-on: https://gerrit.libreoffice.org/62657
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 207d8b88
......@@ -1465,16 +1465,10 @@ void VclBuilder::preload()
};
for (auto & lib : aWidgetLibs)
{
OUStringBuffer sModuleBuf;
sModuleBuf.append(SAL_DLLPREFIX);
sModuleBuf.append(OUString::createFromAscii(lib));
sModuleBuf.append(SAL_DLLEXTENSION);
NoAutoUnloadModule* pModule = new NoAutoUnloadModule;
OUString sModule = sModuleBuf.makeStringAndClear();
std::unique_ptr<NoAutoUnloadModule> pModule(new NoAutoUnloadModule);
OUString sModule = SAL_DLLPREFIX + OUString::createFromAscii(lib) + SAL_DLLEXTENSION;
if (pModule->loadRelative(&thisModule, sModule))
g_aModuleMap.insert(std::make_pair(sModule, std::unique_ptr<NoAutoUnloadModule>(pModule)));
else
delete pModule;
g_aModuleMap.insert(std::make_pair(sModule, std::move(pModule)));
}
#endif // ENABLE_MERGELIBS
#endif // DISABLE_DYNLOADING
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment