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) {
|
for (auto client : clientSet) {
|
||||||
unordered_set<DataItemId> dataItemIdsForThisClient(
|
unordered_set<DataItemId> dataItemIdsForThisClient(
|
||||||
mParent->mClientToDataItems.getValSet(client));
|
mParent->mClientToDataItems.getValSet(client));
|
||||||
for (auto id : dataItemIdsForThisClient) {
|
for (auto itr = dataItemIdsForThisClient.begin();
|
||||||
if (dataItemIdsToBeSent.find(id) == dataItemIdsToBeSent.end()) {
|
itr != dataItemIdsForThisClient.end(); ) {
|
||||||
dataItemIdsForThisClient.erase(id);
|
if (dataItemIdsToBeSent.find(*itr) == dataItemIdsToBeSent.end()) {
|
||||||
|
itr = dataItemIdsForThisClient.erase(itr);
|
||||||
|
} else {
|
||||||
|
itr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue