Skip to content

Commit 86f7f08

Browse files
author
Miro Bucko
authored
Fix return value of 'PluginManager::RegisterPlugin()'. (#114120)
1 parent f7dc1d0 commit 86f7f08

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lldb/source/Core/PluginManager.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,9 @@ template <typename Instance> class PluginInstances {
206206
if (!callback)
207207
return false;
208208
assert(!name.empty());
209-
Instance instance =
210-
Instance(name, description, callback, std::forward<Args>(args)...);
211-
m_instances.push_back(instance);
212-
return false;
209+
m_instances.emplace_back(name, description, callback,
210+
std::forward<Args>(args)...);
211+
return true;
213212
}
214213

215214
bool UnregisterPlugin(typename Instance::CallbackType callback) {

0 commit comments

Comments
 (0)