Move the 'store' method to index_cache_store_context

I think it is cleaner for 'store' to be a method on
index_cache_store_context rather than on the global index cache
itself.  This patch makes this change.
This commit is contained in:
Tom Tromey
2024-01-27 08:59:06 -07:00
parent b183313dfa
commit ba9583c7d5
3 changed files with 12 additions and 14 deletions

View File

@@ -842,7 +842,7 @@ cooked_index::maybe_write_index (const index_cache_store_context &ctx)
if (index_for_writing () != nullptr)
{
/* (maybe) store an index in the cache. */
global_index_cache.store (ctx);
ctx.store ();
}
m_state->set (cooked_state::CACHE_DONE);
}