Added explicit cast to vector<bool> internal type.

This commit is contained in:
Takatoshi Kondo 2015-03-10 19:04:23 +09:00
parent 118cf7270c
commit 2d5c68055c

View File

@ -48,7 +48,7 @@ inline packer<Stream>& operator<< (packer<Stream>& o, const std::vector<bool>& v
o.pack_array(v.size()); o.pack_array(v.size());
for(std::vector<bool>::const_iterator it(v.begin()), it_end(v.end()); for(std::vector<bool>::const_iterator it(v.begin()), it_end(v.end());
it != it_end; ++it) { it != it_end; ++it) {
o.pack(*it); o.pack(static_cast<bool>(*it));
} }
return o; return o;
} }
@ -66,7 +66,7 @@ inline void operator<< (object::with_zone& o, const std::vector<bool>& v)
o.via.array.size = v.size(); o.via.array.size = v.size();
std::vector<bool>::const_iterator it(v.begin()); std::vector<bool>::const_iterator it(v.begin());
do { do {
*p = object(*it, o.zone); *p = object(static_cast<bool>(*it), o.zone);
++p; ++p;
++it; ++it;
} while(p < pend); } while(p < pend);