ServiceProvider: Use std::string as key for services map

This fixes potantial crash that can happen on certain platforms like
macOS due to `typeid(T).name()` returning different pointers to string
which does not happen on all platforms.
This commit is contained in:
Kacper Donat
2024-12-27 22:23:14 +01:00
parent 3774830a46
commit 431f46a4fe

View File

@@ -157,7 +157,7 @@ public:
}
private:
std::map<const char*, std::deque<ServiceDescriptor>> _implementations;
std::map<std::string, std::deque<ServiceDescriptor>> _implementations;
};
BaseExport extern ServiceProvider globalServiceProvider;