Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion include/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ struct IExtensible
{
/// Try to get an extension by its UID
/// @return A pointer to the extension or nullptr if it's not supported
virtual IExtension* getExtension(UID id) { return nullptr; }
virtual IExtension* getExtension(UID id)
{
auto it = miscExtensions.find(id);
if (it != miscExtensions.end())
{
return it->second.first;
}
return nullptr;
}

/// Query an extension by its type
/// Don't call directly, use global queryExtension() instead
Expand Down