mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 09:00:17 +02:00
PassManager: Ensure GetPass() only queries the underlying pass mappings
Previously this would create an entry in the map if it didn't exist.
This commit is contained in:
1 parent
19f95d89ec
commit
53befc68c9
1 file changed
+5
-1
@@ -63,7 +63,11 @@ public:
|
||||
return dynamic_cast<T*>(GetPass(Name));
|
||||
}
|
||||
Pass* GetPass(const fextl::string& Name) {
|
||||
return NameToPassMaping[Name];
|
||||
const auto Iter = NameToPassMaping.find(Name);
|
||||
if (Iter == NameToPassMaping.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
return Iter->second;
|
||||
}
|
||||
|
||||
// Finalizes the pass manager state and assumes no other passes will be added after called.
|
||||
|
||||
Reference in new issue
Block a user