Merge "Filter DataItems with suitable way."
This commit is contained in:
commit
1bc192e57f
1 changed files with 6 additions and 3 deletions
|
@ -328,9 +328,12 @@ void SystemStatusOsObserver::notify(const list<IDataItemCore*>& dlist)
|
|||
for (auto client : clientSet) {
|
||||
unordered_set<DataItemId> dataItemIdsForThisClient(
|
||||
mParent->mClientToDataItems.getValSet(client));
|
||||
for (auto id : dataItemIdsForThisClient) {
|
||||
if (dataItemIdsToBeSent.find(id) == dataItemIdsToBeSent.end()) {
|
||||
dataItemIdsForThisClient.erase(id);
|
||||
for (auto itr = dataItemIdsForThisClient.begin();
|
||||
itr != dataItemIdsForThisClient.end(); ) {
|
||||
if (dataItemIdsToBeSent.find(*itr) == dataItemIdsToBeSent.end()) {
|
||||
itr = dataItemIdsForThisClient.erase(itr);
|
||||
} else {
|
||||
itr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue