| 109 | return ConnectionHash.FindPtr(guid); |
| 110 | } |
| 111 | const std::pair<iterator, bool> Insert(const TGUID& guid, TConnection* conn) { |
| 112 | const std::pair<iterator, bool>& rv = ConnectionHash.insert(std::make_pair(guid, conn)); |
| 113 | if (!rv.second && rv.first == CachedPos) { |
| 114 | CacheResetNum++; |
| 115 | CachedPos = ConnectionHash.begin(); |
| 116 | } |
| 117 | return rv; |
| 118 | } |
| 119 | TIntrusivePtr<IConnection>& operator[](const TGUID& guid) { |
| 120 | return (*((Insert(guid, TIntrusivePtr<TConnection>().Get())).first)).second; |
| 121 | } |
no test coverage detected