| 370 | } |
| 371 | |
| 372 | static bool PopHints(HPreloader preloader) |
| 373 | { |
| 374 | dmArray<PendingHint> new_hints; |
| 375 | { |
| 376 | DM_SPINLOCK_SCOPED_LOCK(preloader->m_SyncedDataSpinlock) |
| 377 | new_hints.Swap(preloader->m_SyncedData.m_NewHints); |
| 378 | } |
| 379 | |
| 380 | uint32_t new_hint_count = 0; |
| 381 | |
| 382 | const uint32_t hint_count = new_hints.Size(); |
| 383 | const PendingHint* hints = new_hints.Begin(); |
| 384 | for (uint32_t i = 0; i < hint_count; ++i) |
| 385 | { |
| 386 | const PendingHint* hint = &hints[i]; |
| 387 | if (PreloadPathDescriptor(preloader, hint->m_Parent, hint->m_PathDescriptor) == RESULT_OK) |
| 388 | { |
| 389 | ++new_hint_count; |
| 390 | } |
| 391 | } |
| 392 | return new_hint_count != 0; |
| 393 | } |
| 394 | |
| 395 | static Result PreloadHintInternal(HPreloader preloader, TRequestIndex parent, const char* name) |
| 396 | { |
no test coverage detected