Returns true if existed. Returns false if it didn't exist. Also adds to the set
| 426 | // Returns true if existed. |
| 427 | // Returns false if it didn't exist. Also adds to the set |
| 428 | static bool UpdateVisited(dmHashTable64<bool>& t, dmhash_t url_hash, bool exists) |
| 429 | { |
| 430 | bool* visited = t.Get(url_hash); |
| 431 | if (visited) |
| 432 | { |
| 433 | *visited = exists; |
| 434 | return true; |
| 435 | } |
| 436 | |
| 437 | if (t.Full()) |
| 438 | { |
| 439 | uint32_t capacity = t.Capacity(); |
| 440 | capacity += 32; |
| 441 | uint32_t table_size = (capacity*2)/3; |
| 442 | t.SetCapacity(table_size, capacity); |
| 443 | } |
| 444 | t.Put(url_hash, exists); |
| 445 | return exists; // it didn't exist |
| 446 | } |
| 447 | |
| 448 | static dmResource::Result GetDependenciesInternal(DependencyIterContext* ctx, const dmhash_t url_hash) |
| 449 | { |
no test coverage detected