No hardcoded bitset size

old-commit-hash: 7d54453f04
This commit is contained in:
Willem Melching
2020-04-09 13:44:35 -07:00
parent bbdce92c16
commit 8fe9afda2a
+1 -1
View File
@@ -516,7 +516,7 @@ void can_health(PubSocket *publisher) {
healthData.setPowerSaveEnabled((bool)(health.power_save_enabled));
// Convert faults bitset to capnp list
std::bitset<32> fault_bits(health.faults);
std::bitset<sizeof(health.faults) * 8> fault_bits(health.faults);
auto faults = healthData.initFaults(fault_bits.count());
size_t i = 0;