Skip to content

Commit e51efc9

Browse files
committed
[clang-tidy] modernize-make-unique
1 parent a85bdf6 commit e51efc9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

xbmc/ServiceManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,16 @@ bool CServiceManager::InitStageTwo(const std::string& profilesUserDataFolder)
140140

141141
m_PVRManager = std::make_unique<PVR::CPVRManager>();
142142

143-
m_dataCacheCore.reset(new CDataCacheCore());
143+
m_dataCacheCore = std::make_unique<CDataCacheCore>();
144144

145145
m_binaryAddonCache = std::make_unique<ADDON::CBinaryAddonCache>();
146146
m_binaryAddonCache->Init();
147147

148-
m_favouritesService.reset(new CFavouritesService(profilesUserDataFolder));
148+
m_favouritesService = std::make_unique<CFavouritesService>(profilesUserDataFolder);
149149

150150
m_serviceAddons = std::make_unique<ADDON::CServiceAddonManager>(*m_addonMgr);
151151

152-
m_contextMenuManager.reset(new CContextMenuManager(*m_addonMgr));
152+
m_contextMenuManager = std::make_unique<CContextMenuManager>(*m_addonMgr);
153153

154154
m_gameControllerManager = std::make_unique<GAME::CControllerManager>(*m_addonMgr);
155155
m_inputManager = std::make_unique<CInputManager>();

xbmc/windowing/wayland/XkbcommonKeymap.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ std::unique_ptr<CXkbcommonKeymap> CXkbcommonContext::LocalizedKeymapFromString(
311311
CLog::LogF(LOGWARNING,
312312
"Failed to compile localized compose table, composed key support will be disabled");
313313
}
314-
return std::unique_ptr<CXkbcommonKeymap>{
315-
new CXkbcommonKeymap(std::move(xkbKeymap), std::move(xkbComposeTable))};
314+
return std::make_unique<CXkbcommonKeymap>(std::move(xkbKeymap), std::move(xkbComposeTable));
316315
}
317316

318317
std::unique_ptr<xkb_state, CXkbcommonKeymap::XkbStateDeleter> CXkbcommonKeymap::

0 commit comments

Comments
 (0)