Fix windows vector issue

This commit is contained in:
William Woodall 2015-10-29 15:35:32 -07:00 committed by Jackie Kay
parent 24fb204192
commit 142c9abbaa

View file

@ -113,27 +113,27 @@ public:
{ {
{ {
VectorRebind<void *> temp; VectorRebind<void *> temp;
for (size_t i = 0; i < subscriptions_.size() * 2; i++) { for (auto & subscriber_handle : subscriber_handles_) {
if (subscriber_handles_[i]) { if (subscriber_handle) {
temp.push_back(subscriber_handles_[i]); temp.push_back(subscriber_handle);
} }
} }
subscriber_handles_.swap(temp); subscriber_handles_.swap(temp);
} }
{ {
VectorRebind<void *> temp; VectorRebind<void *> temp;
for (size_t i = 0; i < services_.size(); i++) { for (auto & service_handle : service_handles_) {
if (service_handles_[i]) { if (service_handle) {
temp.push_back(service_handles_[i]); temp.push_back(service_handle);
} }
} }
service_handles_.swap(temp); service_handles_.swap(temp);
} }
{ {
VectorRebind<void *> temp; VectorRebind<void *> temp;
for (size_t i = 0; i < clients_.size(); i++) { for (auto & client_handle : client_handles_) {
if (client_handles_[i]) { if (client_handle) {
temp.push_back(client_handles_[i]); temp.push_back(client_handle);
} }
} }
client_handles_.swap(temp); client_handles_.swap(temp);