| 62 | } |
| 63 | |
| 64 | TOptional<FOpDecl> FindOp(const FString& OpName) |
| 65 | { |
| 66 | FRWScopeLock Lock(MapLock(), SLT_ReadOnly); |
| 67 | if (const FOpDecl* D = Map().Find(OpName)) |
| 68 | { |
| 69 | // Copy under the read lock so callers hold a value, not a |
| 70 | // pointer into a map that may rehash on the next register. |
| 71 | return *D; |
| 72 | } |
| 73 | return TOptional<FOpDecl>(); |
| 74 | } |
| 75 | |
| 76 | TArray<FOpDecl> GetAllOps() |
| 77 | { |