Instance: make "partition" a std::list
With this commit, multi-player support becomes possible... it's just not wired to the frontend yet. This is based on massive amounts of refactoring work I did over the past 9 years.
This commit is contained in:
@@ -59,7 +59,9 @@ Instance::OnDatabaseModified()
|
||||
/* propagate the change to all subsystems */
|
||||
|
||||
stats_invalidate();
|
||||
partition->DatabaseModified(*database);
|
||||
|
||||
for (auto &partition : partitions)
|
||||
partition.DatabaseModified(*database);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -77,7 +79,8 @@ Instance::OnDatabaseSongRemoved(const char *uri)
|
||||
}
|
||||
#endif
|
||||
|
||||
partition->StaleSong(uri);
|
||||
for (auto &partition : partitions)
|
||||
partition.StaleSong(uri);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -87,13 +90,15 @@ Instance::OnDatabaseSongRemoved(const char *uri)
|
||||
void
|
||||
Instance::FoundNeighbor(gcc_unused const NeighborInfo &info)
|
||||
{
|
||||
partition->EmitIdle(IDLE_NEIGHBOR);
|
||||
for (auto &partition : partitions)
|
||||
partition.EmitIdle(IDLE_NEIGHBOR);
|
||||
}
|
||||
|
||||
void
|
||||
Instance::LostNeighbor(gcc_unused const NeighborInfo &info)
|
||||
{
|
||||
partition->EmitIdle(IDLE_NEIGHBOR);
|
||||
for (auto &partition : partitions)
|
||||
partition.EmitIdle(IDLE_NEIGHBOR);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user