g13d: Use C++11 iterator instead of a raw C loop

Signed vs. unsigned types throwing all kinds of errors.
This commit is contained in:
June Tate-Gans 2021-04-25 14:31:45 -05:00
parent 19faa21256
commit bbb3104eaf

View File

@ -221,10 +221,12 @@ void G13_Device::cleanup() {
void G13_Manager::cleanup() { void G13_Manager::cleanup() {
G13_LOG(info, "cleaning up"); G13_LOG(info, "cleaning up");
for (int i = 0; i < g13s.size(); i++) {
g13s[i]->cleanup(); for (auto device : g13s) {
delete g13s[i]; device->cleanup();
delete device;
} }
libusb_exit(ctx); libusb_exit(ctx);
} }